Lesson 2.12: Private addresses, NAT and port forwarding
Public and private IPv4 addresses (the RFC 1918 ranges), the other special ranges (loopback, link-local, carrier-grade NAT, documentation), how network address translation lets a whole home or office share one public address, why that hides inside devices from the internet, and how port forwarding deliberately opens a door through it. In the lab you compare your private and public address, read the same connection captured on both sides of the router, and find a 'temporary' forwarding rule that exposes a server to the whole internet.
18 min
You will learn to
- Name the private IPv4 ranges and other special ranges
- Tell your private address from your public address
- Explain NAT and port address translation
- Explain port forwarding and its risk
- Find a risky forwarding rule
Key terms
- Public IP address
- An address that is unique on the whole internet and reachable from it.
- Private IP address
- An address from a range reserved for internal networks; not routed on the internet, so it can be reused everywhere.
- NAT
- A router rewrites the private source address of outgoing packets to its public address, and reverses it for the answers.
- Carrier-grade NAT (CGNAT)
- NAT done by the internet provider, so many customers share one public address. Your router then has an address from 100.64.0.0/10.
- Port forwarding
- A rule on a NAT router that sends incoming connections on one public port to a chosen inside device and port.
← Looking at text files: cat, less and more · All lessons · The Cyber Kill Chain: an attack step by step →