Skip to content

Firewall Rules ​

Firewall Rules is the list of ports the server accepts traffic on, and from where. Everything not listed here is closed.

Firewall rules

Overview ​

URL: /admin/settings/firewall-rules

Open it from Settings > Security > Firewall Rules in the sidebar. The page subheading reads "Manage system firewall rules, including port access and IP restrictions."

The rule list ​

ColumnMeaning
ProtocolTCP, UDP, ICMP (IPv4), or ICMPv6 (IPv6).
IP VersionWhich address family the rule is applied over: IPv4, IPv6, or IPv4 + IPv6.
SourceThe address traffic must come from. Any when unrestricted.
Source PortThe port traffic must come from. Any when unrestricted.
DestinationThe address on this server the rule applies to. Any when unrestricted.
Destination PortA port or a range, for example 443 or 49152-65535.
CommentWhat the rule is for, for example AdminBolt - HTTPS.

Each row has Edit and Delete. The search box works across the visible columns, and the page size can be set to 5, 10, 25, 50, or All.

Fix System Ports restores the rules the managed services need. Use it after an experiment closes a port the panel, web server, DNS, FTP, or mail depends on.

Default rules ​

A fresh installation creates these:

CommentProtocolDestination Port
AdminBolt - AdminTCP8443
AdminBolt - HTTPTCP80
AdminBolt - HTTPSTCP443
Allow ICMP (IPv4 ping and diagnostics)ICMP (IPv4)Any
Allow ICMPv6 (IPv6 ping and diagnostics)ICMPv6 (IPv6)Any
DNS TCPTCP53
DNS UDPUDP53
FTPTCP21
FTP PassiveTCP49152-65535
Mail - DovecotTCP4190
Mail - IMAPTCP143
Mail - IMAPSTCP993
Mail - POP3TCP110
Mail - POP3STCP995
Mail - SMTPTCP25
Mail - SMTPTCP587
Mail - SMTPSTCP465
SSHTCP22

The two ICMP rules keep the server answering ping and the diagnostics that depend on it, over each family separately.

Creating a rule ​

Create Firewall Rule opens a form:

FieldDescription
ProtocolTCP, UDP, ICMP (IPv4), or ICMPv6 (IPv6).
Action (required)Accept lets the traffic through, Drop discards it silently, Reject answers with an error. Block rules are applied before accept rules, so a block cannot be shadowed by an accept on the same port.
Source IPThe address the rule applies to. Leave blank for any source.
Source PortThe port traffic comes from. Leave blank for any source port.
Destination IPThe address on this server. Leave blank for any.
Destination PortA single port or a range. Leave blank to cover all ports, which is how a rule is written for an address rather than for a service.
CommentA description you will recognise later.

A rule that would match every address on every port asks for an explicit confirmation before it is saved, so a rule that opens or closes the whole server is never one field away.

Execute Rule saves and applies the rule; Cancel closes the form. Edit on a row reopens the same form with the current values.

Delete removes a rule after a confirmation. Deleting a rule closes the port it opened, so check what depends on it first.

IPv4, IPv6, and both ​

The addresses you pin a rule to decide which family it covers, and the IP Version column states the result for every row:

RuleIP Version
Source or destination is an IPv4 addressIPv4
Source or destination is an IPv6 addressIPv6
No source and no destination addressIPv4 + IPv6

This matters when you open a port to a single address. A rule that allows 203.0.113.10 opens the port over IPv4 for that address and leaves it closed over IPv6. To reach the same service over both families, create a second rule pinned to the corresponding IPv6 address.

Where a restriction cannot be expressed for one family, the port stays closed there rather than being opened to everyone. Identical rules are applied once, so a duplicate you create by accident does not produce a duplicate rule on the server.

  • Fail2Ban Settings - automatic bans, which are written into the same firewall.
  • SSH Access - the SSH port and the addresses allowed to reach it.