<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy" -->

---
title: Systemd-Networkd as a Router | daily.dev
description: A walkthrough of building a home router on plain Debian using systemd-networkd instead of OpenWRT or OPNsense, favoring a declarative, ini-style configuration...
canonical: https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Systemd-Networkd as a Router | daily.dev
og:description: A walkthrough of building a home router on plain Debian using systemd-networkd instead of OpenWRT or OPNsense, favoring a declarative, ini-style configuration...
og:url: https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy
og:image: https://api.daily.dev/og/posts/lyy342RgY.png
og:image:alt: Systemd-Networkd as a Router
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Systemd-Networkd as a Router

**[apalrd's adventures](https://daily.dev/sources/apalrd)** · 1 min read · 0 upvotes · 0 comments

## Summary

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.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.apalrd.net/posts/2026/asn_networkd>

## 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._

## Similar posts on daily.dev

- [How to turn anything into a router](https://daily.dev/posts/how-to-turn-anything-into-a-router-n8fniwjoc) · Hacker News · 0 upvotes · 0 comments
- [A Survey of the 7 Configuration Changes That Turn a Multi-homed Linux Host into a Switch/Router – blog](https://daily.dev/posts/a-survey-of-the-7-configuration-changes-that-turn-a-multi-homed-linux-host-into-a-switch-router-bl-lcmrlvhci) · Hacker News · 0 upvotes · 0 comments
- [I used an old router as a dedicated smart home network, and it solved two problems at once](https://daily.dev/posts/i-used-an-old-router-as-a-dedicated-smart-home-network-and-it-solved-two-problems-at-once-vogsqytyh) · XDA Developers · 0 upvotes · 0 comments
- [Revisiting Making Your Own Internet Router In 2026](https://daily.dev/posts/revisiting-making-your-own-internet-router-in-2026-vxzjrpv0i) · Hackaday · 1 upvotes · 1 comments
- [My home network observes bedtime with OpenBSD and pf](https://daily.dev/posts/my-home-network-observes-bedtime-with-openbsd-and-pf-lomdphego) · Lobsters · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#networking](https://daily.dev/tags/networking)

[View this post on daily.dev](https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Systemd-Networkd as a Router","url":"https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy"},"datePublished":"2026-08-13T15:14:27.498Z","dateModified":"2026-08-13T15:14:44.875Z","description":"A walkthrough of building a home router on plain Debian using systemd-networkd instead of OpenWRT or OPNsense, favoring a declarative, ini-style configuration...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"apalrd's adventures","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"apalrd's adventures","logo":"https://media.daily.dev/image/upload/s--4zkx8dRj--/f_auto,q_auto/v1786438309/logos/apalrd?_a=BAMAMicg0","url":"https://daily.dev/sources/apalrd"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,networking","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"apalrd's adventures","item":"https://daily.dev/sources/apalrd"},{"@type":"ListItem","position":3,"name":"Systemd-Networkd as a Router"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/systemd-networkd-as-a-router-lyy342rgy#faq","mainEntity":[{"@type":"Question","name":"How do I set up systemd-networkd to act as a router with VLANs and nftables on Debian?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}
```

