Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ This attack requires the NAT/firewall to support ALG (Application Level Gateways

# The Deets

## Network Address Translation (NAT)
## Network Address Port Translation (NAPT)

We use NATs (Network Address Translation) for several reasons. The most useful feature of NAT is that it allows a single public IP address to be shared among multiple systems. It does this by creating a local network, providing local IP addresses to all machines that connect, and when one of those systems reaches out to the Internet, it rewrites packets going out to use the public IP so responses come back to the NAT, and vice versa, rewriting destination IP to specific client's IP.
We use NAPT (Netowrk Adress Port Translation) for several reasons. The most useful feature of NAPT is that it allows a single public IP address to be shared among multiple systems. It does this by translating local/private ip addresses which are created by DHCP (Dynamic Host Configuration Protocol) for each device when a device joins the local network. When one of those systems reaches out to the Internet, it adds an entry to the NAPT table and it rewrites packets going out to use the public IP so responses come back to the NAPT, and vice versa, rewriting destination IP to specific client's IP.

It's the responsibility of the NAT to differentiate connections to the same addresses/ports (google.com:443) from internal hosts as ultimately their outbound port, destination ip and source ip will all be the same. If two different internal peers attempt to connect from the same source port, modern NATs will alter one of the source ports (some networks do this to all TCP/UDP source ports).
It's the responsibility of the NAPT to differentiate connections to the same addresses/ports (google.com:443) from internal hosts as ultimately their outbound port, destination ip and source ip will all be the same. If two different internal peers attempt to connect from the same source port, modern NAPTs will alter one of the source ports (some networks do this to all TCP/UDP source ports).

![NAT](img/lan.png)

Expand Down