---
title: Block an IP
slug: homologacao-atmosphere/block-an-ip
description: Learn how to block an IP address using the Shell module with this comprehensive document. It covers essential parameters like table name, IP address, and access permission. Discover a step-by-step example of using the Shell module to block an IP address, 
createdAt: 2022-07-26T13:46:44.000Z
---

## Resumo

- Bloquear um IP

## Parâmetros

| **Parâmetro** | **Tipo** | **Escolhas \| Valor Padrão** | **Comentários**     |
| ------------- | -------- | ---------------------------- | ------------------- |
| table         | string   |                              | Nome da tabela.     |
| 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 }} -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            |

