Repository navigation
Firewall
The Firewall is an optional feature that turns a ZNAS server into the router of your home or lab. It can replace a firewall VM (OPNsense, pfSense…) that joins your networks, filters what goes between them and the Internet, serves DHCP/DNS, runs a VPN and watches for intrusions.
Above all it shows who talks to whom: every connection from and to the Internet, by address, country and city, with data volumes, in tables and on a live world map.
The Firewall is IPv4 only. IPv6 is turned off on every interface it manages.
Go to Requisites → Optional Features and click Enable on the Firewall card. On the USB appliance everything is pre-installed. On a host, every package it uses (nftables, conntrack, dnsmasq-base, wireguard-tools, suricata, ppp) is installed for you when you enable it; their services stay off until you configure them. The server must already use ifupdown networking (enabling VMs & Containers switches it). Enabling needs the portal to run as root or with full sudo. Once enabled, a hardened sudoers file gets a dedicated ZFSNAS_SDN block (see Security).
The wizard asks:
- Management interface: the network you reach the portal from. The built-in anti-lockout rule always allows the portal and SSH there.
- Interfaces to adopt: your network ports, with a name and a role (WAN for Internet links, LAN for inside networks).
-
Starting policy:
- Monitor only (recommended to start): nothing is filtered, and the traffic statistics and map start working right away.
- Router: the rules are enforced, and anything not allowed is blocked.
A fourth sidebar mode, Firewall, appears next to Storage, Compute and Infrastructure. Its pages:
| Group | Pages |
|---|---|
| Monitor | Local Topo, Traffic & GeoMap, Live connections, IDS alerts, DNS queries |
| Configure | Interfaces, Rules, NAT, Routing, Groups & countries |
| Services | DHCP & DNS, WireGuard, Dynamic DNS, Intrusion detection |
On the USB Appliance the Firewall is built into the image: nothing is downloaded when you enable it, and it can run the house router straight from the appliance.
Disabling the feature (the Disable button on the same Optional Features card) puts back the networking you had before enabling it.
Every edit goes to a draft. Nothing touches the router until you click Apply, which lists what will change.
- Auto-revert is a checkbox in the Apply dialog, off by default; it remembers your last choice for the browser session. When it is ticked, a 30-second countdown starts after Apply; click All good — keep it to confirm. If the change cut you off, you can't click, and the router goes back to the previous configuration by itself. This still works if the portal restarts or the server reboots during the countdown.
- Last Change ‹time date› (top right) lists the last 15 applied changes; click one to go back to it, also with a countdown.
- The ⋮ menu (top right, admins only) holds Export and Import of the configuration, and Discard for the pending changes.
- Mode: while the Firewall is in Monitor only, the Interfaces page has a Monitor only / Router switch. Once Router mode is applied, the whole Mode banner goes away so nobody stops the filtering on a production router by mistake. Going back is in the ⋮ menu: Switch to Monitor only… (in orange) asks for confirmation and takes effect at the next Apply. Before you apply, Stay in Router mode in the same menu cancels it.
- If the saved configuration can't be loaded at boot, the Firewall starts in safe mode: only the management interface is reachable, and a banner explains why.
Monitor → Local Topo is the one-page map of everything on your inside networks, refreshed every 5 seconds.

- Summary tiles: networks and Internet links, hosts up, running VMs and containers, DHCP addresses in use, live download and upload of the inside hosts, open connections, DNS lookups blocked and IDS alerts of the last 7 days.
- On the left: each Internet link (address, state, active or standby, latency and live traffic) joined to this router, the list of networks with their host counts, a summary of the firewall policy per interface (allow and block rules, port forwards, DNS and IDS state) and the local routes.
- In the middle: the trunk from the router to each network, one coloured stripe per network. A dotted line is a tunnel or a link on standby, and a thicker line carries more traffic.
- On the right: every host of each network, grouped by where it is: this server, VMs and containers (virtual ports), and the other devices on the network. Each one shows its name (or the maker of its network card), its address and whether it is online, idle, not seen recently or offline. Port forwards to a host are listed under it.
- Filter by name, address, MAC, maker or port, or show only the hosts that are up, VMs and containers, DHCP clients or hosts with IDS alerts.
- Hover any address for its address card.
Hosts are found from the DHCP leases and reservations, the router's neighbour table, Incus instances, WireGuard peers and the traffic statistics. The 24-hour traffic of each host is computed in the background every 10 minutes, so it is blank for a few minutes after the portal starts.

- Incoming connections (from the Internet to you) and outgoing ones (from your networks to the Internet), by address, country, city and network owner, with bytes in/out and the number of connections.
- Incoming rows also show the inside host and port they reached, and the public address and port they hit. When a connection reached the router itself on a port that one of your port forwards publishes, the row says not forwarded to ‹host:port›: the forward didn't catch it, typically because a modem in front of the server forwards that port to the server's own address instead of its WAN. Outgoing rows show the ports reached on the remote side with their service (
443 HTTPS,853 DNS over TLS…); type a port number in the search box to see only that service. - Blocked attempts are counted too, per source, port and rule. With By IP they are listed per address (with a Block IP button); with By country or By city, per country.
- The map draws one arc per remote place. The arrow in the middle of each arc points away from whoever started the connection, line width is volume, and dashed red lines are blocked attempts. Hover an arc (tap it on a tablet) for its details, including the Internet IP in By IP mode; click it to highlight it in the tables.
- The map opens zoomed in around your server, three + clicks in from the whole world.
- Zoom with the scroll wheel, a double-click, a pinch or the + / − buttons, and drag to move around; the globe button goes back to the whole world.
- On an iPad or phone: pinch with two fingers to zoom and move the map, double-tap to zoom in, and once zoomed in drag with one finger. At the whole-world view, one finger scrolls the page as usual.
- The map mode button (layers icon) switches between the simple map (country outlines, nothing loaded from the Internet) and a street map from OpenStreetMap (roads and city names, zoomable to neighbourhood level). Your browser then loads the map tiles from openstreetmap.org. OpenStreetMap has no dark map of its own, so on dark themes its tiles are shown with inverted colours. The choice is saved with your user account.
- Ranges: 1 hour, 24 hours, 7 days, 30 days, 1 year, 5 years. Statistics are kept at 5-minute precision for 2 weeks, hourly for 2 months and daily for 5 years. Long ranges keep the top talkers individually and fold the rest into exact per-country totals.
Low disk wear: statistics stay in memory and are written once every 10 minutes, to a pool dataset (<pool>/znas-netstats), never to the boot disk or the appliance's USB stick. Until you choose a pool, they stay in RAM.
Geolocation: the free DB-IP Lite databases (country, city, network owner) are downloaded monthly. "IP geolocation by DB-IP.com" (CC BY 4.0).
Live connections lists the connections open right now (search by address, name, country or host), with a Kill button to cut one. When an address, internal or external, has a DNS name, the name is shown in small text under it.
Sorting: click a column title in any Monitor table (Traffic, Live connections, IDS alerts) to sort by it; click it again to reverse. Amounts start with the biggest, names and addresses from A / lowest, and severity from High. The order is kept while the page refreshes.


| Kind | What it is |
|---|---|
| Network port | An existing port, adopted with its addressing (static, DHCP client or none) |
| VLAN | Created by the Firewall on a trunk port. With Allow VMs, it becomes a bridge that VMs and containers can use. |
| PPPoE | An Internet link over a port or VLAN (user name and password from your ISP; MTU 1492 and MSS clamping handled) |
| VM network | An Incus bridge from VMs & Containers, adopted so the Firewall routes and filters it |
| WireGuard | A tunnel, created on the WireGuard page |
The name you give an interface is the one used everywhere it appears: the Network Focus top headers, the traffic and gateway tables, the IDS alerts, the Infrastructure tables and map, and the dashboard charts. The Linux name (e.g. enp6s0, ppp-…) is shown on hover, and only on its own when the interface has no name.
Incus networks that have their own address, such as host-nat, also appear on the page with a Managed by Incus badge. Incus gives them their address, DHCP, DNS and NAT, so the Firewall leaves them alone: their card is read-only, with a link to change the network under VMs & Containers. In Router mode, traffic from their instances is not filtered by your rules.
Edit an interface and clear Enable this interface to stop using it and keep its settings for later. It's on by default. When you apply:
- An adopted port's link goes down and stays down, even after a reboot. A VLAN or PPPoE link is removed from the system.
- Its DHCP server, DNS listening, virtual IPs, gateway and dynamic DNS stop. A disabled gateway is skipped, so traffic fails over to the next one.
- Its rules and port forwards stay saved, and the card shows a Disabled badge.
Turn it back on and apply to restore everything.
If it's the management interface, a port that an enabled VLAN or PPPoE link runs on, or the interface with the last gateway, ZNAS tells you what that breaks and offers Disable anyway. For the management interface, keep auto-revert ticked when you apply. WireGuard tunnels can't be disabled here.
If every interface intrusion detection watches is disabled, it stops, and starts again when one is enabled.
Remove lists what depends on the interface before anything changes. Firewall rules on it, its gateways and their outbound NAT rules, dynamic DNS and DHCP go with it. Rules that left through its gateway go back to normal routing, and port forwards stay but no longer use it. The management interface can't be removed.
A virtual IP is an extra address in one of your existing networks, separate from the server's own address. The typical use is the network's gateway address. Your clients point to it, and it can later move to another ZNAS server without changing either server's own (management) address.
- Add one with New interface → Virtual IP, or the Virtual IP button on an interface card. The interface must have a static address, and the virtual IP must be inside its network: not its network or broadcast address, not an address already in use in the configuration, and outside its DHCP range and reservations.
- Clients use it as their gateway and DNS server: DHCP on that network then hands out the virtual IP, not the server's own address, as the clients' gateway and DNS server (at their next lease renewal). An explicit gateway or DNS list in the DHCP settings still wins.
- The card lists each virtual IP with its state: pending (until you apply), active, or in use elsewhere, when another device already answers for that address (hover for its MAC).
- No conflicts: before taking the address, ZNAS checks that nobody else answers for it. If another server still holds it, it is not added; ZNAS takes it as soon as it is free (checked every 30 seconds). After taking it, ZNAS announces it on the network so the clients switch to this server at once.
- Kept alive: the address is re-added by itself if a link restart removes it, and removed when you release it or turn the Firewall off.
- Moving it to another server: release it here (the × button, then Apply), then add the same virtual IP on the other ZNAS.
The conflict check and the announcement use the small iputils-arping package. The Firewall offers to install it with its other packages. Without it, ZNAS still checks for conflicts (with a ping and the ARP table), but the clients then take a few minutes to notice a move.

- Rules belong to the interface the traffic arrives on. The first matching rule wins. Any interface rules are checked first.
- Each rule has an action (allow, block, reject), protocol, source, destination and port(s).
- Sources and destinations can be: any, Internal networks (every inside network: all non-WAN interfaces with their own address — a VLAN added later is included automatically), an address or network, a group, a whole interface network, This ZNAS (the router itself), or countries. Everything except this inverts any of them (e.g. not Internal networks = the Internet).
- Drag rows to reorder them. The counters show hits, and a toggle disables a rule without deleting it.
- Leaves through: an allow rule can send its traffic out of a chosen gateway (Internet link), or only that one.
Groups & countries keep reusable lists of hosts/networks, ports and countries:


Port forwards publish an inside service on one or more interfaces:
- Settings: protocol, public port or range, allowed sources (any, groups, countries), and the inside address and port.
- NAT reflection (optional) lets inside clients use the public address too.
- Forwards of VMs and containers are edited in the instance editor: tick the interfaces each forward is published on. They show up here with an instance badge. A forward that existed before you enabled the Firewall starts paused until you pick its interfaces. They follow the instance's address automatically.
Outbound NAT:
- Automatic: your networks are masqueraded behind each WAN.
- Hybrid: your manual rules first, then automatic.
- Manual: only your rules.
A manual rule chooses the outgoing gateway and the translation: the interface address, another address, or none.
On every Firewall page, internal addresses have a dotted underline. Hover one (tap it on an iPad or phone) to open its card, with everything ZNAS knows about that address:

- Identity: names, MAC address and the maker of its network card, whether it's a VM, a container, a VPN client or this server, and whether it's answering on the network right now.
- Network: its network and VLAN, its DHCP lease or reservation, and the router it's reached through if it isn't directly connected.
- Right now: current download and upload speed, and its biggest open connections. These refresh while the card is open.
- Last 24 hours: volume, sessions and top destinations.
- DNS and intrusion detection: recent lookups and blocked ones, top domains, and alerts from the last 7 days.
- Firewall: the groups, rules and port forwards that use the address.
Phones often use a private MAC address they generate themselves, so these show no maker. The makers come from the IEEE list built into ZNAS, so nothing is sent over the Internet.
Public addresses are underlined too. Their card tells you who is on the other side:

- Network and location: owner (AS number) and city, from the DB-IP databases.
- Reverse DNS: the PTR name, marked confirmed when that name points back to the address.
- Registry: owner, address block, range, country, abuse contact and dates, from RDAP.
- Blocklists: whether the address is on Spamhaus DROP, FireHOL level 1 or the Tor exit list. These lists are downloaded with the daily geolocation update and checked locally.
- Ask online: GreyNoise, Shodan and AbuseIPDB are only queried when you click them, since that sends the address to the service. AbuseIPDB needs your free API key (the key icon).
Click inside a card to pin it while you read it or follow its links.
Configure → Routing holds the Internet links (gateways), the routes to your other networks, and the history of the links.

Each Internet link is a gateway, listed in failover order.
- New gateway: choose any interface, or a network port not in the Firewall yet (saving adds it as a WAN), and give it a gateway address and a priority. The online gateway with the lowest number is used. A gateway already at that number moves down one.
- PPPoE: New PPPoE link adds a session, with its own priority. Several sessions can run on the same port.
- Monitoring: the gateway monitor pings a target of your choice through each monitored gateway (every 2 s by default, or several pings every few seconds). Each card shows its latency and loss, from those checks only: no extra traffic is sent to measure them.
- Failover: when the preferred gateway loses half its checks, or is silent for 10 s, traffic moves to the next working one.
- Return: traffic comes back after the gateway has been healthy for a minute, so a flapping link doesn't bounce traffic.
- PPPoE reconnect: a monitored PPPoE link that fails its checks is also hung up and dialled again (the card says On failure: reconnects PPPoE). It is not redialled when its target has never answered, and after a failed attempt the pause grows from 1 minute up to 30 minutes. Without monitoring, only the PPPoE session's own keepalive notices a dead link.
- No other gateway: when no other gateway can take over, a gateway that fails its checks is shown as down and you get the alert, but its traffic and open connections are left alone. The checks can fail while the link still works, for example when only the pinged address stops answering.
- Replies: connections that arrived through a gateway are answered through it.
-
Independence: the monitor runs as its own service (
znas-sdn-gw), so it keeps working while the portal restarts. It also repairs the routing by itself every 10 seconds: a default route or local route lost after a link restart comes back without the portal.
The latency of the active gateway also shows in the Network focus header (now / average), and the Performance → Networking tab keeps its history.
Local routes tell the router which router leads to a network that is not directly connected, for example a network behind another router on your LAN, or a site behind a VPN.
- Add route: destination network, next hop and interface, a metric and a description. Routes take effect when you apply, come back by themselves after a reboot or when their interface returns, and are part of the Firewall's backups.
- Turn off keeps a route saved without using it.
- The table also lists the routes already on the system: the default route (Edit gateway), WireGuard networks (Edit tunnel) and routes set outside the Firewall (Edit takes them over). All routes in use on this server shows the full routing table.
- Routes only choose the path: your firewall rules still decide what may pass.
The table under the routes records when an Internet link went down, why, when it came back and how long it was out: failovers, gateway down and up, PPPoE link drops (with the reason, such as the ISP closed the connection or no PADO), reconnect attempts and the new public address. PPPoE links are recorded even when they are not monitored, and repeated failed redials are summarised instead of flooding the list.
Show all firewall events opens the SDN tab of the Activity & Events bar, which adds dynamic DNS updates, changes reverted by the countdown and safe mode. These events can also be sent as notifications (Settings → Alerts → Firewall events).

-
DHCP per network:
- range, with optional excluded addresses (single addresses or first-last ranges inside the range, never handed out; the editor shows what is left);
- lease time, gateway, DNS servers (one or more) and time servers (NTP) handed out, domain;
- routes handed out: networks the clients reach through another router in their network (sent as DHCP options 121 and 249). Clients that get routes ignore the plain gateway option, so the default route through the gateway is always sent with them;
- reservations (MAC → address + name). Under Options, a reserved address can get its own gateway, DNS servers or lease time instead of the network's;
- the live leases table, with Make static.
- Address check before offering (per network, on by default): before offering an address, the server pings it and skips it if a device answers. A new device then waits about 3 s for its first address (fixed in dnsmasq); a device renewing its address is not delayed. It is useful while a network moves from another DHCP server; turn it off where new devices join all day. Devices that block ping are not seen.
- every setting has an i button that explains it (click, or hover with a mouse).
-
DNS on the networks you pick:
- upstream servers, and a local domain;
- devices that got an address by DHCP answer by name (
nameandname.domain); - host names you add, and domains sent to another server (conditional forwarding).
Unknown Internal IP/FQDN matching, above the leases, lists the addresses on your networks that have no name: no DHCP host name, no DNS record and no reverse-DNS answer. Each row says what the address may be (this server, a VM or container, a VPN client, the maker of its network card) and lets you name it in place:
- DHCP devices: the name follows the device's MAC address, whatever address it leases next.
- Reserved addresses: the name goes on the reservation.
- Static addresses: a fixed DNS record is added.
Names reach DNS after Apply. A device using a private MAC address can change it and then loses its name.
DNS is one dnsmasq of the Firewall's own (znas-sdn-dns). DHCP is one dnsmasq per network, run by znas-sdn-dhcp: editing one network's DHCP restarts only that network's server, never DNS or the other networks, and a server that stops is restarted on its own (the network's card shows not running meanwhile). The names each DHCP server hands out reach the one DNS server within seconds, in that network's domain (its own Domain, else the Local DNS domain): name, name.domain and the reverse lookup. Each server is bound only to its network, so none conflicts with Incus' own DHCP. Leases of the single server of earlier versions are carried over to each network at the upgrade. Incus networks with their own address (host-nat) are shown read-only on the same page: their DHCP range, their name.incus DNS names and their leases, which come from Incus. DHCP and DNS are allowed through the firewall automatically on the networks they serve.
In Local DNS (DHCP & DNS page):
-
Blocklists: lists of domains to block (ads, trackers, malware), fetched from their address every day and with Update lists now. Hosts files, plain domain lists and Adblock lists (
||domain^) are read. Add a popular list offers StevenBlack's hosts and HaGeZi Multi NORMAL. A blocked name gets0.0.0.0(and::for IPv6); only the exact names on the lists are blocked, as with Pi-hole. A list that cannot be fetched keeps its last good version, and its error is shown under it. - Allowed domains (never blocked) and Blocked domains (always blocked).
- Collect advanced metrics: every lookup is recorded for the reports. The query log is kept in memory; the history is saved with the Firewall statistics (the pool chosen on the Traffic page).
Updating the lists never restarts DNS: the server is told to read its blocklist file again.
Monitor → DNS queries shows what Pi-hole shows:

-
Dashboard, for 24 hours, 7 days, 30 days or 1 year: total queries, queries blocked and the percentage, domains on the blocklists; queries over time (allowed and blocked) and client activity over time; query types; who answered (each upstream server, the cache, local names, the blocklist); top allowed domains, top blocked domains, top clients and top blocked clients. Clicking a domain or a client opens the matching queries.

-
Query log: the newest 100,000 lookups, with what happened to each (forwarded and to which server, cached, local, blocked) and the answer, filtered by domain, client and status. Allow and Block add a domain to the allowed or blocked domains, in the draft (Apply to take effect).

- A tunnel has an address, a UDP port and a key made on the server. When you create it, the Firewall offers:
- a WAN rule opening its port, optionally only from chosen countries;
- a rule letting its peers reach everything.
- A phone or computer: choose Generate for me. The configuration and its QR code are shown once: the router keeps only the public key. Choose whether the device sends all its traffic through the tunnel or only traffic to the networks you tick (add others by hand), and optionally the DNS servers it should use. This sets the device's routing: what it may actually reach is decided by the tunnel's rules.
- Another site: paste its public key, list its networks (they get routed through the tunnel), and optionally its address to dial.
- The status shows each peer's last handshake, where it connects from (with its country) and its traffic.
The tunnel is an interface like the others: give it rules, and see its traffic in the statistics.
The tunnel repairs itself, even with the portal stopped (znas-sdn-gw, every 10 seconds):
- A site given by name never delays startup: ZNAS starts the tunnel first and looks the name up afterwards, retrying until DNS answers.
- When the other site's address changes, ZNAS looks the name up again once there has been no handshake for 3 minutes, and switches to the new address. Allow for that delay, plus the time the other site's Dynamic DNS takes to update.
- When the other site is down, ZNAS keeps trying at least once a minute. WireGuard alone would stop after 90 seconds until something sent traffic through it. This needs a keepalive on the peer.
- A tunnel that is down or lost its peers is brought back, with growing pauses up to 5 minutes between attempts.
The WireGuard page shows what's happening: Waiting for DNS, Trying to connect, Down, retrying, and the previous address after a change.
Keeps host names at your DNS provider pointed at this router's public address, with ddclient.

- There is one card per gateway. Each gateway has its own names, which follow that link's address even while traffic goes out another gateway. A name like
fibre.example.comalways reaches the fibre link, andlte.example.comthe backup. - Providers: Cloudflare (zone + API token), DuckDNS, No-IP, Dyn, Namecheap, OVH, or any other server speaking the dyndns2 protocol (HTTPS only).
-
Address sent:
- Interface address: the address on the gateway's interface. Use it when the server holds the public address itself, for example with PPPoE.
- Seen from the Internet: use it when a modem in front of the server does NAT. The card marks a private interface address so you know which one to pick.
- The address is checked every 5 minutes. The provider is only called when the address changed, and every name is sent again after an apply that changes Dynamic DNS.
- A new interface address is sent within seconds, without waiting for the 5-minute check. A failed update is tried again after about a minute, then less often, at least every 5 minutes. If the provider refuses (wrong password, unknown name), only the 5-minute check goes on, so the account isn't blocked for abuse.
- Each name shows its last result: Updated / Up to date with the address and time, or the provider's refusal (wrong user name or token, unknown name…).
- Passwords and tokens never reach the browser. Leave the field empty when editing to keep the stored one.
- Removing a gateway removes its names too. The records stay at the provider with their last address.

Suricata watches the chosen interfaces (by default every WAN) in detection mode: it raises alerts and never blocks by itself.
-
Rules:
- ET Open is always used, with the categories you pick; the defaults are exploit, malware, compromised, drop and botcc;
- free extra sets can be added: abuse.ch SSL blacklist and botnet C2 IPs, Feodo Tracker, URLhaus, Nmap scans…;
- rules are downloaded when you enable it, then every day.
- Resources: plan for about one CPU core and 0.5–1 GB of memory with the default categories.
- Notifications: severe alerts can become ZNAS notifications (Settings → Alerts → Firewall intrusion detection), at most once an hour per signature and source.

IDS alerts groups alerts by signature, source and destination (a port scan is one line, with the ports it touched). Each line is shown the way the connection was opened: the source is whoever started it, even when the alert was raised on a reply.
Hosts behind NAT: Suricata watches the Internet links, where your inside hosts all appear as the router's public address. When an alert arrives, ZNAS looks the connection up in the router's connection table and records the real inside host: the inside address then replaces the public one, with a NAT badge. This works for connections your hosts open to the Internet and for port forwards. It needs the connection to still be open (or just closed) when the alert comes in, which is almost always the case. Alerts from before this feature, and probes of closed ports, keep the public address. Notifications show it too: 10.0.8.20 (via 69.156.169.77).
Hover the Source → destination cell (tap it on a tablet) for an address card: for each side, the inside address and the public address, each with its name, i.e. the virtual machine or container name, the DHCP host name, or "This ZNAS", and its reverse-DNS name (FQDN). The search box also finds alerts by inside address or by name.
Internal addresses by name: when an internal (private) address has a DNS name, the table shows the name instead of the address; hover it to see the address. Public addresses always stay as addresses.
The Filtering bar at the top narrows the list (remembered in your browser):
- All ports / Only open ports: Suricata sees traffic before the firewall, so it also reports probes of ports the firewall drops anyway. Only open ports (the default) hides alerts from the Internet that targeted a port nothing opens — no port forward, no allow rule, no WireGuard port. Those never send a notification either.
- All / From Internet / To Internet: connections started outside, or started from your networks (or the router) towards the Internet.
- All networks or one network: only the alerts with an address in that network's subnet, including inside hosts found behind the NAT. Each network shows how many alert groups it has.
Each line offers:
- Block: adds two rules blocking all traffic to and from that address;
- Suppress: stops alerting on the signature, for everyone or for one address.
Alerts are sent to the portal directly, never written to a log file, and kept 30 days.
… menu → Export saves the whole Firewall configuration in one password-encrypted file (.znasfw): interfaces, groups, rules, gateways, NAT, DHCP & DNS, WireGuard tunnels and keys, and IDS settings.
Import shows what will change and lets you map interfaces when the port names differ (new hardware), then applies with the countdown. The Firewall configuration is also part of the full .znasbak backup (see Backup & Migration). Restoring one never switches the Firewall on or replaces a running configuration: with the Firewall on, it becomes the draft for you to review and apply; with it off, the Enable wizard offers Start from the restored configuration, asks which port replaces each one that isn't on this server, and applies with the countdown.
Home dashboards such as homepage can show the Firewall's numbers with their Pi-hole and OPNsense widgets, using a ZNAS API key (Settings → API Keys, see User Management):
- DNS:
widget:
type: pihole
url: https://192.168.1.1:8443
version: 6 # 5 works too
key: <your-api-key>
- Router:
widget:
type: opnsense
url: https://192.168.1.1:8443
username: znas # any value
password: <your-api-key>- Pi-hole: total and blocked queries of the last 24 hours, the percentage and the domains on the blocklists (DNS reports must be on).
- OPNsense: CPU and memory use, and the WAN's download and upload since the first of the month.
These endpoints are read-only and only answer with a valid API key.
| Unit | Role |
|---|---|
znas-sdn |
At boot, before networking: loads the firewall and writes the service files (safe mode if that fails) |
znas-sdn-gw |
Gateway monitor and failover |
znas-sdn-dns |
DNS (dnsmasq), blocklists and query log |
znas-sdn-dhcp |
DHCP: one dnsmasq per network, restarted on its own if one stops |
znas-sdn-ids |
Intrusion detection (Suricata) |
znas-sdn-ddns |
Dynamic DNS (ddclient) |
Routing, NAT, DHCP, DNS and WireGuard keep working when the portal is stopped or upgraded. The firewall lives in its own nftables table (ip znas_sdn), next to Incus' and Docker's, which it leaves alone.
- View: the Firewall pages need the View firewall permission (and admins and read-only users can see them).
- Change: applying, restoring, export/import and cutting connections are for admins only.
An Incus network that has an address, such as a VLAN bridge your VMs use as their gateway, can be added on Interfaces → New interface → Adopt a network port. Incus keeps its address, DHCP and DNS, and you keep editing those in VMs & Containers. The Firewall follows those changes. Adding or removing the network never changes its Incus settings.
Once added, you can use it like any other interface:
- Outbound NAT: add a rule with this network as the source and your Internet gateway, so its VMs can reach the Internet.
- Port forwards: forward a port from your WAN to an address behind this network.
- Firewall rules: in router mode, its VMs lose access to other networks and the Internet until you add allow rules. DHCP from Incus, and DNS if Incus serves it, keep working.
If Incus has its own NAT turned on for the network, the dialog says so. Turn it off in VMs & Containers if you want your outbound NAT rules to apply. The network can't be deleted in VMs & Containers while the Firewall uses it, and Firewall DHCP can't be turned on while Incus DHCP is on.
Getting Started
Storage
- Dashboard & Monitoring
- Physical Disks
- ZFS Pools
- Datasets & ZVols
- MergerFS
- Snapshots & Protection
- File Sharing — SMB
- File Sharing — NFS
- iSCSI
- S3 Object Storage
- Capacity Trends
- Encryption
- UPS Management
Virtualization
Networking
Administration
Reference