Policies, objects & NAT¶
Firewall policy¶
Policies are evaluated top-down, first match wins, then intra-zone rules, then an implicit deny (logged by default). Established/related traffic is accepted before policies, so policies only see new connections.
| Field | Values |
|---|---|
| Incoming / Outgoing | interfaces or zones, any |
| Source / Destination | address objects, groups, literal IPs/CIDRs/ranges, all |
| Service | service objects or groups, ALL |
| Schedule | always or a schedule object (days + time window) |
| Action | ACCEPT, DENY (silent drop), REJECT (TCP reset / ICMP) |
| NAT | masquerade to the outgoing interface (IPv4) |
| Log | log new sessions (rate-limited) |
Reorder policies by drag and drop in the web UI or move 5 before 2 in the CLI.
The Hits column shows live counters per policy.
Objects¶
| Object | Notes |
|---|---|
| Address | subnet (IP or CIDR, IPv4/IPv6), range (a-b), fqdn (re-resolved every minute into dynamic nftables sets) |
| Address group | nested groups allowed (loops detected) |
| Service | tcp, udp, tcp/udp with ports/ranges, icmp/icmpv6 with type, ip with protocol number. ~30 predefined services |
| Service group | nested groups allowed |
| Schedule | weekdays + HH:MM–HH:MM (windows across midnight supported) |
Overlapping addresses are merged automatically when generating nftables sets.
NAT¶
- Policy NAT — the NAT toggle of an accept policy masquerades its traffic.
- Source NAT — explicit rules evaluated first: masquerade, static SNAT to an address, or none (exemption, e.g. for site-to-site VPN traffic).
- Port forwarding (DNAT) — incoming interface/zone, protocol, external
address/port, internal address/port, optional allowed sources. Auto policy adds the
forward rule for you (
ct status dnat).
Policy lookup¶
Policy & Objects → Policy Lookup (CLI: diagnose firewall policy-lookup) simulates
a connection: it determines the ingress interface from the source address, applies port
forwarding, routes the destination, evaluates every policy and shows the trace with the
reason each rule did or did not match.
Rule analyzer¶
Policy & Objects → Rule Analyzer (CLI: diagnose firewall analyze) and the commit
review report:
| Severity | Check |
|---|---|
| critical | policy shadowed by an earlier rule with a different action |
| critical | any/any/ALL accept reachable from a WAN interface; DNS open on a WAN interface |
| warning | redundant policy; overly permissive rule; HTTPS/SSH on WAN without trusted hosts; overlapping port forwards; zone without interfaces |
| info | disabled policies, accept without logging, unused or duplicate objects, rules without hits for 7 days |