What changes when you turn a Linux box into a router

https://news.ycombinator.com/rss Hits: 2
Summary

This was written on March 1, 2026 What does it mean to turn a Linux system into networking infrastructure? I think it is incredibly cool that we can change a Linux system into a networking device. But have you ever wondered: What are we changing when we turn a Linux system into a router or switch? What are we changing if we make a raspberry pi into a WiFi access point? How significant is the system performance monitoring change? What are the gates we have to change to enable packet forwarding and processing? I’m going to start out with a narrative explanation of the changes that turn a Linux system into a WiFi access point and then I’ll show the commands for implementing it. I have a cognitive bias: I think of networking devices and computers as different things. This is because the command line experience on networking gear is different than what you experience on servers/hosts. On servers and workstations: you tend to focus a lot on objects on the file system. On networking gear, you’re spending most of your time working with running processes directly. Commands and interaction objectives on networking gear is very different than those on hosts. I suspect a lot of other people who have worked in networking have similar feelings about networking appliances versus host operating systems. This might be specific to my journey. But for better or worse, I felt that networking was different than general computing. It isn’t. If you know networking, you can make Linux do networking things if you make 7 changes. Activating IP Forwarding Defining The Bridge Activating nftables policies Stateful Firewalling with conntrack Defining NAT and Masquerade policies Vending DHCP and DNS with dnsmasq Vending WiFi networks with hostapd To activate packet processing and forwarding in the Linux Kernel, you start by changing the Kernel’s configuration for networking. Every Android device that vends a personal WiFi hotspot makes the same general changes. A packet’s journey through the kern...

First seen: 2026-04-03 21:16

Last seen: 2026-04-03 22:17