Linux › Section I · Your network and its configuration › Topic I.11
Linux as a router: private networks and NAT
A router is just a computer with more than one network interface, so any Linux machine can be one. This topic switches on forwarding, joins two private subnets, and shares one public address with them using masquerading in nftables, the same trick that home routers, containers and virtual machines rely on.
In this topic
- A router is a computer that forwards
- Switching on forwarding
- Worked example: routing between two LANs
- Routes must work both ways
- Private addresses and why NAT is needed
- Masquerading with nftables
- Worked example: one public address for a LAN
- The iptables way, and connection tracking
- Routers that run Linux
- Common mistakes to avoid
- Key takeaways
This topic is part of Wuanberri Pro. Checking your access…
