Network Address Translation (NAT)

A comprehensive guide to NAT, SNAT, and DNAT

Featured image



🎯 Overview

Network Address Translation (NAT) is a crucial networking technology that enables address translation between private and public networks.

💡 What is NAT?

NAT converts network addresses from one type to another, primarily used to:

  • Solve IP address shortage
  • Protect internal networks
  • Enable multiple devices to share one public IP



🔄 NAT Types

Static NAT

Dynamic NAT

PAT (Port Address Translation)



🌐 Advanced NAT Types

SNAT (Source NAT)

Purpose:
- Translates source IP for outbound traffic
- Enables internal network access to internet
- Manages port translation

DNAT (Destination NAT)

Purpose:
- Translates destination IP for inbound traffic
- Enables port forwarding
- Manages external access to internal servers



📊 NAT Workflow Example

🔑 Component 🏠 Private IP 🌐 Public IP
Internal Client 192.168.1.100 -
NAT Device - 198.51.100.1
External Client - 203.0.113.50
Internal Server 192.168.1.200 -

🌐 Explanation

SNAT Process

Original Packet:
Source: 192.168.1.100:12345
Destination: 203.0.113.50:80

Translated Packet:
Source: 198.51.100.1:54321
Destination: 203.0.113.50:80

DNAT Process

Original Packet:
Source: 203.0.113.50:44321
Destination: 198.51.100.1:80

Translated Packet:
Source: 203.0.113.50:44321
Destination: 192.168.1.200:80



📚 Reference