Skip to content

List externally managed firewall rules

GET/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.

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'
{
  "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
    }
  ]
}

Authorization

Authorizationstringheaderrequired

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.

Send it as Bearer <token>.

Path parameters

serverstringrequired

The server uuid short

Response 200

application/json

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

itemsobject[]required

The rules, in the order the server evaluates them.

Show child attributes
positionintegerrequired

Where the rule sits in the server's top-down evaluation order.

directionstring | nullrequired

Which way the rule looks.

One of: in, out, null

actionstring | nullrequired

What the rule does with what it matched.

One of: ACCEPT, DROP, null

macrostring | nullrequired

The named service the rule matches, where it uses one ("SSH", "Ping").

protocolstring | nullrequired

The protocol the rule matches, such as tcp, udp or icmp.

source_portstring | nullrequired

The port or port range the traffic comes from, where the rule names one.

destination_portstring | nullrequired

The port or port range the traffic is headed for, where the rule names one.

sourcestring | nullrequired

The address or range the traffic comes from, where the rule names one.

destinationstring | nullrequired

The address or range the traffic is headed for, where the rule names one.

commentstring | nullrequired

Whatever note the rule carries. Often the only description of a reference to a provider rule set, which has nothing else to show.

enabledbooleanrequired

A rule can sit on a server switched off. It still counts as in force.

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.