# GET /security/firewall

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the security group.

Get the firewall's configuration and status

- Who may call it: administrator
- Token scope, any of: security, read, all
- Answers: 200 OK

Returns whether the firewall is enabled, which ports are open and why, and the configured rules. The response includes the configured SSH port, the SSH listener ports recorded when UrbeStack last generated the firewall configuration, and the ports selected for the web interface. It also reports the ports for the plugin pages, phpMyAdmin, and webmail and whether each is open.

The pending value describes the change awaiting confirmation and is null when no automatic revert is armed. The client object reports the caller's IP address and whether an allow rule covers it. The IP address is null when unavailable, and allowed_by is null when no rule matches.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/security/firewall" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "client": {
    "address": "info@example.com",
    "allowed": true,
    "allowed_by": "text"
  },
  "enabled": true,
  "loopback": {
    "customers": [
      1
    ],
    "ports": [
      {
        "port": 8443,
        "why": "text"
      }
    ]
  },
  "panel_port": 8443,
  "panel_ports": [
    8443
  ],
  "pending": {
    "armed_at": "text",
    "deadline": "text",
    "kind": "ssh-port",
    "new_port": 8443,
    "old_port": 8443,
    "what": "text"
  },
  "phpmyadmin_active": true,
  "phpmyadmin_port": 8443,
  "plugins_active": true,
  "plugins_port": 8443,
  "ports": [
    {
      "closed": {
        "id": 1,
        "note": "added by hand",
        "since": "text"
      },
      "port": 8443,
      "proto": "tcp",
      "why": "text"
    }
  ],
  "rules": [
    {
      "created_at": "2026-09-09T10:15:00Z",
      "id": 1,
      "kind": "port",
      "note": "added by hand",
      "value": 8443
    }
  ],
  "ssh_port": 8443,
  "sshd_ports": [
    8443
  ],
  "webmail_active": true,
  "webmail_port": 8443
}
```

## Errors

- 401: Authentication required
