-
Notifications
You must be signed in to change notification settings - Fork 3
Firewall Rules
The Firewall Rules page (/admin/rules) manages network policies and per-user firewall rules enforced via nftables. (The sidebar entry is labelled Firewall Rules.)

Global toggles that control broad network behavior:
- Allow peer-to-peer communication - When enabled, VPN clients can communicate directly with each other through the WireGuard tunnel
- Allow local network to reach peers - When enabled, devices on the server's local network can reach VPN clients. Important: your LAN router also needs a static route for the WireGuard subnet — see LAN-to-Peer Routing for setup instructions.
These policies are applied immediately when toggled.
Fine-grained firewall rules that control what traffic VPN clients can send. Rules can be scoped globally (all users) or to a specific user, and are compiled into per-user nftables chains.
| Column | Description |
|---|---|
| Priority | Evaluation order within the chain (lower runs first) |
| Action |
accept or drop
|
| Destination | Target IP/CIDR (e.g., 10.0.0.0/8, 0.0.0.0/0) |
| Protocol |
tcp, udp, or any
|
| Port(s) | Specific port or range (e.g., 80, 443, 8000-9000), or any
|
| User | The user this rule applies to, or Global for all users |
nftables evaluates a chain top to bottom and stops at the first match, so the order of rules matters. Each rule has a priority — a lower number is evaluated first (closer to the top of the chain).
This is what makes "allow-list" setups possible. The canonical pattern for restricting a user to a specific set of destinations is:
- One
acceptrule per allowed CIDR (lower priority numbers) - A single
droprule for0.0.0.0/0last (highest priority number)
Because the catch-all drop sits at the bottom, the accept rules above it are matched first; anything not explicitly allowed falls through to the drop.
Reordering: when you filter the table to a single user (see below), the rules render as a drag-and-drop list. Drag a row to change its position — priorities are renumbered and the user's nftables chain is rebuilt automatically. New rules are appended to the end of the chain by default; drag them into place or set the priority directly from the edit dialog.
Ordering is deterministic: the per-user chain is always (re)built in ascending priority order, including on startup reconciliation, so a catch-all
dropcan never accidentally end up ahead of youracceptrules.
As the number of users grows, reviewing one user's rules at a time becomes essential. The Filter by user selector at the top of the Per-User Rules card is searchable:
- Choose All users to see every rule (read-only table, sortable by column).
- Choose a specific user to see only that user's rules, rendered as the drag-and-drop ordering list described above.
- With a user selected, clicking Add Rule pre-fills the Applies to field with that user.
Click Add Rule to open the creation dialog.

- Destination (required) - Target IP address or CIDR range
-
Action -
acceptto allow traffic,dropto block it -
Protocol -
tcp,udp, orany - Port Range - Port number or range (leave empty for all ports)
-
Applies to - Scope to a specific user, or leave as
Global(pre-filled from the active user filter)
Rules are applied to the nftables ruleset immediately upon creation. Editing a rule lets you change its action, destination, protocol, ports, priority, and scope.
The bottom section provides a button to view the current nftables ruleset for debugging. This shows the raw nftables rules as applied on the server, useful for verifying that rule order and firewall rules are correctly translated.