---
title: Allow/Deny IP's on port
slug: homologacao-atmosphere/allowdeny-ips-on-port
description: Learn how to control access to specific ports with this module that allows or denies IP addresses. Set parameters such as table name, protocol, port number, and IP address to determine access permissions. This module utilizes the Shell module's parameters
createdAt: 2022-07-26T13:46:57.000Z
---

## Resumo

- Permitir/Negar IPs na porta

## Parâmetros

| **Parâmetro** | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**     |
| ------------- | -------- | ---------------------------- | ------------------- |
| table         | string   |                              | Nome da tabela.     |
| protocol      | string   | - tcp<br />- udp<br />- icmp | Protocolo           |
| port          | string   |                              | Porta               |
| IP            | string   |                              | IP                  |
| allow\_deny   | string   | - allow<br />- deny          | Bloquear ou liberar |

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

## Exemplos

```yaml
- shell: 
    arguments: sudo iptables -A {{ input.table }} -p {{ input.protocol }} --dport {{ input.port }} -s {{ input.IP }} -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            |

