---
title: Allow/Deny TCP traffic of an IP
slug: homologacao-atmosphere/allowdeny-tcp-traffic-of-an-ip
description: Learn how to control TCP traffic from a specific IP address with this comprehensive script summary. Utilizing parameters from the Shell module, this script offers practical examples for implementation. Discover the various values returned by the script, e
createdAt: 2022-07-26T13:46:43.000Z
---

## Resumo

- Permitir/Negar tráfego TCP de um IP

## Parâmetros

| **Parâmetro**      | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**            |
| ------------------ | -------- | ---------------------------- | -------------------------- |
| table              | string   |                              | Nome da tabela.            |
| input\_output      | string   |                              | Em qual tráfego será salvo |
| network\_interface | string   | - http<br />- https          |                            |
| ip                 | string   |                              |                            |
| 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 }} {{ input.input_output }} {{ input.network_interface }} -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            |

