---
title: Allow a Network on IP
slug: homologacao-atmosphere/allow-a-network-on-ip
description: Learn how to create a network on a specific IP address with this comprehensive module summary. Utilizing parameters from the Shell module, you can easily specify table name, network interface, IP address, port, and access permissions. Discover practical e
createdAt: 2022-07-26T13:46:50.000Z
---

## Resumo

- Permite uma Network em um IP especifico

## 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      |
| ip                 | string   |                                | Ip                             |
| port               | interger |                                | Porta para liberar ou blockear |
| allow\_deny        |          | - ACCEPT<br />- DROP           | Blockear ou liberar            |

## Exemplos

```yaml
tasks:
- name: Allow a Network on IP
  shell:
		arguments: |
			sudo iptables -A {{ input.table }} -p {{ input.network_protocol }} -s {{input.ip}} --dport {{ input.port }} -m conntrack --ctsatate NEW,ESTABLISHED -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            |

