Set up NAT and routing

Set up NAT and routing in Linux — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Set up NAT and routing so the internal lab subnet 172.16.4.0/24 can reach the Internet through…
Set up NAT and routing so the internal lab subnet 172.16.4.0/24 can reach the Internet through router-gw-1. Add masquerade rules on the gateway, create a static route on router-gw-1 for 172.16.4.0/24 via 10.1.8.2, ensure forwarding is enabled and saved, test outbound connections from a lab VM, and document the commands used in the network ticket.

Improve — make it easier to accept

+
Before I apply the NAT change, make approval easy: put the outbound IP and which services will be…
Before I apply the NAT change, make approval easy: put the outbound IP and which services will be reachable up front, show the exact iptables or nft commands and the rollback commands, highlight security risks such as open ports forwarded from Internet, and note whether hairpin NAT is required for internal services.

Decide — diagnose the stuck moment

+
I added masquerade on the gateway and enabled forwarding, but lab VMs still fail to reach external…

After adding NAT the lab VMs cannot reach external sites

I added masquerade on the gateway and enabled forwarding, but lab VMs still fail to reach external sites. I suspect a missing default route on the gateway, a conflicting firewall rule, or reverse path filtering. What is the most likely diagnosis and the quickest checks and fixes to restore outbound connectivity immediately?

Become — change the pattern

+
Every time we add NAT for a new subnet, something else stops: routes missing, firewall policies too…

Recurring breakage when adding NAT for new subnets

Every time we add NAT for a new subnet, something else stops: routes missing, firewall policies too permissive, or no monitoring of SNAT counts. What one habit change and one small automated test would prevent most of these mistakes and keep our routing predictable?

Next to this one

Other operating system work people do in Linux.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.