---
title: Allow Connection on a Specific Network
slug: homologacao-atmosphere/allow-connection-on-a-specific-network
description: Learn about a module that enables seamless connection to a designated network. Explore the various parameters and options available, including network interface, protocol, IP, port, connection state, and permission settings. Discover a comprehensive examp
createdAt: 2022-07-26T13:46:51.000Z
---

## Resumo

- Permite a conexão em uma network especifica.

## Parâmetros

Utiliza parâmetros do módulo [Shell](https://docs.simonops.com/homologacao-atmosphere/shell).

| **Parâmetro**      | **Tipo** | **Escolhas \| Valor Padrão**       | **Comentários**                |
| ------------------ | -------- | ---------------------------------- | ------------------------------ |
| table              | string   |                                    | Nome da tabela                 |
| network\_interface | string   | - eth0<br />- eth1<br />- wlan     | Tipo de network interface      |
| protocol<br />     | string   | - tcp<br />- udp<br />- icmp       | Protocolo                      |
| ip                 | string   |                                    | Ip                             |
| port               | interger |                                    | Porta para liberar ou blockear |
| state              | string   |                                    | Estado da conexão              |
| allow\_deny        |          | - ACCEPT<br />- DROP<br />- REJECT | Blockear ou liberar            |

## Exemplos

```yaml
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            |

