Lion Cipher Lab
Trace your routing table and NAT: how a packet actually leaves your machine
- Foundations
- Intermediate
- ~50 min
- Free · no account required
Why it matters
Almost everyone who works with computers can say the words 'it goes to the router,' and almost nobody can say what that actually means: which router, chosen how, with what address on the packet, and why the reply ever finds its way home. That gap is where a surprising amount of real confusion lives. It is why people cannot explain why they can reach the internet but the internet cannot reach their laptop; why 'port forwarding' feels like magic instead of a table entry; why two houses can both use 192.168.1.10 with no conflict; why a VPN or a container suddenly 'can't see the network'; and why…
What you'll learn
- reading your own routing table on Linux, macOS and Windows
- identifying the default route / default gateway and what it means
- understanding longest-prefix match: how the kernel picks ONE route
- using `ip route get` to watch the kernel choose interface and source for a real destination
- telling loopback, LAN and internet-bound routes apart from the decision itself
- recognising RFC 1918 private address space and why it is not routable on the internet
- seeing NAT happen by contrasting your private IP with your public IP
- explaining source NAT / masquerade and the conntrack translation table that lets replies return
- judging why NAT is address conservation, not a firewall, and what CGNAT and port forwarding really are
Steps in this lab
- What a routing table is — and why the kernel consults it for every packet
- Read your own routing table
- Watch the kernel pick a route: loopback vs LAN vs the internet
- Private vs public: see NAT happen with your own eyes
- How the reply finds its way home: the NAT translation table (conntrack)
- The judgment step: NAT is not a firewall — plus CGNAT and port forwarding
- What you learned — and the deeper follow-on