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

**Attach a firewall preset.** Attach a preset's address ranges (SSH only) to an environment, a website, your company or yourself. Scope: write. Long-running: answers with a task.

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

## When to use it

Attach a preset's ranges (SSH only) to an environment, a website, your company or yourself. Long-running: completes once every environment has applied it.

## Inputs

- `preset_id` (integer, required)
- `owner` (object, required) — `{type, id}`: `environment` (its `environment.id`), `website`, `company`, or `user` (your own id)

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "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"
    },
    "preset_id": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "preset_id",
    "owner"
  ],
  "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_preset_present`: already attached here.

## Example

```json
{
  "name": "corestack_firewall_preset_attach",
  "arguments": {
    "preset_id": 12,
    "owner": {
      "type": "company",
      "id": 31
    }
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_firewall_preset_attach with preset_id 12, owner {"type":"company","id":31}. (Attach a firewall preset.) Tell me what it returned.
```

## The same task elsewhere

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