---
title: "corestack_firewall_entry_add"
url: https://docs.corefinity.com/mcp/tools/corestack_firewall_entry_add
type: tool
last_updated: 2026-11-13
feature: firewall
related:
  - https://docs.corefinity.com/api/reference/firewall/create-firewall-entry.md
  - https://docs.corefinity.com/guides/sites/access-and-security/firewall.md
---
# corestack_firewall_entry_add

**Add a firewall address.** Add an IPv4 or IPv6 address or range (up to /24, IPv6 /48) to the firewall of an environment, a website, your company or yourself, for SSH, the website, or both, with an optional expiry and comment. Scope: write. Long-running: answers with a task.

- Scope: `write`
- Runs as a task: yes

## When to use it

Add an IPv4 or IPv6 address or a range up to /24 (IPv6 /48) at an environment, a website, your company or yourself, for SSH, the website, or both. Long-running: answers with a task that completes once every environment has applied it.

## Inputs

- `owner` (object, required) — `{type, id}`: `environment` (its `environment.id`), `website`, `company`, or `user` (your own id)
- `address` (string, required): `203.0.113.7` or `203.0.113.0/24`
- `scope` (string): `both` (default), `ssh` or `web`
- `expires_in_days` (integer): 1, 30, 90 or 365
- `comment` (string, ≤ 200)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "address": {
      "description": "An IPv4 or IPv6 address, or a CIDR range (e.g. 203.0.113.7 or 203.0.113.0/24).",
      "maxLength": 64,
      "minLength": 2,
      "type": "string"
    },
    "comment": {
      "description": "A note shown beside the address (at most 200 characters).",
      "maxLength": 200,
      "type": "string"
    },
    "expires_in_days": {
      "description": "Remove the address after 1, 30, 90 or 365 days. Leave it out for no expiry.",
      "enum": [
        1,
        30,
        90,
        365
      ],
      "type": "integer"
    },
    "owner": {
      "additionalProperties": false,
      "description": "Where the address is added: an environment, a website, a company, or user (your own id: every environment you can reach).",
      "properties": {
        "id": {
          "minimum": 1,
          "type": "integer"
        },
        "type": {
          "enum": [
            "environment",
            "website",
            "company",
            "user"
          ],
          "type": "string"
        }
      },
      "required": [
        "type",
        "id"
      ],
      "type": "object"
    },
    "scope": {
      "description": "What the address may reach: both (default), ssh only or web only (the website's HTTP authentication and maintenance page).",
      "enum": [
        "both",
        "ssh",
        "web"
      ],
      "type": "string"
    }
  },
  "required": [
    "owner",
    "address"
  ],
  "type": "object"
}
```

## Refusals

- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).
- `switched_off`: the firewall is not available for this object yet.
- `firewall_approval_required`: wider than /24 (IPv6 /48) — send it with corestack_firewall_range_request.
- `firewall_width_refused`: /8 or wider, never accepted.
- `firewall_address_refused`: a private, reserved or shared provider range.
- `firewall_cap_exceeded`: over the limit of this level or of an environment it reaches.
- `firewall_duplicate`: already on this list.

## Example

```json
{
  "name": "corestack_firewall_entry_add",
  "arguments": {
    "owner": {
      "type": "environment",
      "id": 9120
    },
    "address": "203.0.113.7",
    "comment": "Office"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_firewall_entry_add with owner {"type":"environment","id":9120}, address 203.0.113.7, comment Office. (Add a firewall address.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/firewall/entries](https://docs.corefinity.com/api/reference/firewall/create-firewall-entry.md)
- Guide: [Firewall](https://docs.corefinity.com/guides/sites/access-and-security/firewall.md)
