> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Block IPs

- Component: `appmixer.imperva.waf.SetBlockIPRule`
- Kind: Action
- Version: 1.1.0
- Visibility: Public
- Connector: [appmixer.imperva 1.2.3](https://connectors.appmixer.com/connector/appmixer.imperva/1.2.3.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.imperva/1.2.3/component/appmixer.imperva.waf.SetBlockIPRule>

Blocks a list of IP addresses by adding a blocking custom rule to the WAF (using RULE_ACTION_BLOCK action).

## Properties

_No properties defined._

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Site ID (`siteId`) | text | - |
| IPs (`ips`) | textarea | List of IP address which will be blocked by adding a blocking custom rule to the waf. The values must be separated by a comma, space or newline. JSON format is also supported, for example: ["1.1.1.1", "2.2.2.2"]. |
| TTL (`ttl`) | number | Time to live in seconds. The IPs will be automatically removed after this duration. If not set, the IPs will remain permanent. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Site ID (`siteId`) | string | - |
| IPs (`ips`) | array | - |
| Rules (`rules`) | array | - |

## Full metadata (component.json)

```json
{
  "version": "1.1.0",
  "name": "appmixer.imperva.waf.SetBlockIPRule",
  "label": "Block IPs",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Blocks a list of IP addresses by adding a blocking custom rule to the WAF (using RULE_ACTION_BLOCK action).",
  "private": false,
  "auth": {
    "service": "appmixer:imperva"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "siteId": {
            "type": "number"
          },
          "ips": {
            "type": "string"
          },
          "ttl": {
            "type": "integer"
          }
        },
        "required": [
          "siteId",
          "ips"
        ]
      },
      "inspector": {
        "inputs": {
          "siteId": {
            "type": "text",
            "index": 0,
            "label": "Site ID",
            "source": {
              "url": "/component/appmixer/imperva/waf/ListSites?outPort=out",
              "data": {
                "messages": {
                  "in/isSource": true
                },
                "transform": "./ListSites#toSelectArray"
              }
            }
          },
          "ips": {
            "type": "textarea",
            "index": 1,
            "label": "IPs",
            "tooltip": "List of IP address which will be blocked by adding a blocking custom rule to the waf. The values must be separated by a comma, space or newline. JSON format is also supported, for example: [\"1.1.1.1\", \"2.2.2.2\"]."
          },
          "ttl": {
            "type": "number",
            "index": 2,
            "label": "TTL",
            "tooltip": "Time to live in seconds. The IPs will be automatically removed after this duration. If not set, the IPs will remain permanent."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "Site ID",
          "value": "siteId",
          "schema": {
            "type": "string",
            "example": "12345678"
          }
        },
        {
          "label": "IPs",
          "value": "ips",
          "schema": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "192.0.2.10",
              "198.51.100.7"
            ]
          }
        },
        {
          "label": "Rules",
          "value": "rules",
          "schema": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rule_id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "action": {
                  "type": "string"
                },
                "filter": {
                  "type": "string"
                },
                "sendNotifications": {
                  "type": "boolean"
                }
              }
            },
            "example": [
              {
                "rule_id": "94521",
                "name": "Custom IP Block Rule 1715678400000 1",
                "action": "RULE_ACTION_BLOCK",
                "filter": "ClientIP == 192.0.2.10 | ClientIP == 198.51.100.7",
                "sendNotifications": false
              }
            ]
          }
        }
      ]
    }
  ],
  "properties": {},
  "icon": "(data URI omitted)"
}
```
