# List externally managed firewall rules

`GET https://console.advinservers.com/api/v1/client/servers/{server}/firewall-groups/unmanaged-rules`

### Overview

Lists active rules that are not managed by your firewall groups, such as a provider's outbound mail restriction. These rules are read-only. Use firewall groups to manage your own rules.

`importing` is true while older server rules are being moved into an editable firewall group. Check again in a minute or two.

The response uses the last retrieved server rules and may be slightly out of date. An unreachable server returns an empty list rather than an error.

### Permissions

Requires the `firewall.read` (View the firewall) permission for the selected team. Resources outside that team return 404.

## Authorization

Send `Authorization: Bearer <token>` with the request. Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

## Path parameters

- `server` (string, required): The server uuid short

## Response 200

The record, as a JSON object. There is no envelope.

- `items` (object[], required): The rules, in the order the server evaluates them.
  - `position` (integer, required): Where the rule sits in the server's top-down evaluation order.
  - `direction` (string | null, required): Which way the rule looks. One of: `in`, `out`, `null`.
  - `action` (string | null, required): What the rule does with what it matched. One of: `ACCEPT`, `DROP`, `null`.
  - `macro` (string | null, required): The named service the rule matches, where it uses one ("SSH", "Ping").
  - `protocol` (string | null, required): The protocol the rule matches, such as tcp, udp or icmp.
  - `source_port` (string | null, required): The port or port range the traffic comes from, where the rule names one.
  - `destination_port` (string | null, required): The port or port range the traffic is headed for, where the rule names one.
  - `source` (string | null, required): The address or range the traffic comes from, where the rule names one.
  - `destination` (string | null, required): The address or range the traffic is headed for, where the rule names one.
  - `comment` (string | null, required): Whatever note the rule carries. Often the only description of a reference to a provider rule set, which has nothing else to show.
  - `enabled` (boolean, required): A rule can sit on a server switched off. It still counts as in force.

```json
{
  "items": [
    {
      "position": 0,
      "direction": "out",
      "action": "DROP",
      "macro": null,
      "protocol": "tcp",
      "source_port": null,
      "destination_port": "25",
      "source": null,
      "destination": null,
      "comment": "smtp-block",
      "enabled": true
    }
  ]
}
```

## Errors

- `401`: The key was missing, malformed, revoked, or belongs to an account that no longer exists.
- `403`: Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `429`: Too many requests. The `Retry-After` header says how many seconds to wait. Limits are per account, so several keys on one account share them.

## Example request

```bash
curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/servers/{server}/firewall-groups/unmanaged-rules' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
