Allow Connection on a Specific Network
4 min
Resumo
Permite a conexão em uma network especifica.
Parâmetros
Utiliza parâmetros do módulo Shell.
Parâmetro | Tipo | Escolhas | Valor Padrão | Comentários |
|---|---|---|---|
table | string | | Nome da tabela |
network_interface | string |
| Tipo de network interface |
protocol | string |
| Protocolo |
ip | string | | Ip |
port | interger | | Porta para liberar ou blockear |
state | string | | Estado da conexão |
allow_deny | |
| Blockear ou liberar |
Exemplos
tasks:
- name: Allow connection on a specific network
shell:
arguments: "sudo iptables -A {{ input.table }} {{ input.network_interface }} -p {{ input.protocol }} -s {{ input.IP }} --dport {{ input.port }} -m state --state {{ input.state }} -j {{ input.allow_deny }}"
register: result
Valores retornados
Chave | Tipo | Retornado quando | Descrição |
|---|---|---|---|
output | string | Sempre | Saída da execução |
had_errors | boolean | Sempre | Se teve erros |
output_errors | string | Sempre | Erros de saída da execução |
output_warnings | string | Sempre | Avisos de saída |