A walkthrough of building a home router on plain Debian using systemd-networkd instead of OpenWRT or OPNsense, favoring a declarative, ini-style configuration approach. Covers example network unit files for backup, VLAN parent, WAN, and LAN interfaces, plus an nftables.conf for firewall rules.
Questions this post answers
How do I set up systemd-networkd to act as a router with VLANs and nftables on Debian?
Configure separate .network files in /etc/systemd/network/ for each interface role: a parent VLAN interface with VLAN slaves, a WAN interface handling DHCPv6 upstream, and a LAN interface for the local network. Firewall and NAT rules go in /etc/nftables.conf, which may require a systemd unit to load it at boot. Developers wiring up declarative router configs can track systemd-networkd tips like these on daily.dev.
46 Impressions