---
title: Allow DNS connection
slug: homologacao-atmosphere/allow-dns-connection
description: Learn about a module that enables DNS connection with this comprehensive document. Discover the essential parameters like table name, network interface type, port type, port number, and connection permission. Explore a practical example showcasing module 
createdAt: 2022-07-26T13:46:56.000Z
---

## Resumo

- Permite conexão DNS

## 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                                    |
| port\_type         | string   | - dport<br />- sport           | Tipo de porta: dport = destination port, sport = source port |
| port               | interger |                                | Porta para liberar ou blockear                               |
| allow\_deny        |          | - ACCEPT<br />- DROP           | Blockear ou liberar                                          |

## Exemplos

```yaml
tasks:
- name: Allow DNS connection
  shell:
		arguments: |
			sudo iptables -A {{ input.table }} {{ input.network_interface }} -p udp {{ input.port_type }} {{ input.port }} -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            |

