What is the difference between SNAT and DNAT?

Source NAT (SNAT) and Destination NAT (DNAT) are two fundamental types of Network Address Translation that serve different purposes in network communication. Understanding their differences is crucial for network administrators managing traffic between private and public networks.

SNAT (Source NAT)

SNAT represents Source NAT and is used when an internal user initiates a connection with an external host. The NAT device translates the private IP address of the internal host to a public IP address, and may also translate the source port in TCP or UDP headers.

When creating outbound connections, ephemeral ports are used to maintain distinct traffic streams. These ports, when used for SNAT, are called SNAT ports. Each IP address provides 65,535 available ports for translation.

SNAT - Internal to External Communication Internal Network Private IP: 192.168.1.10 NAT Device External Network Public IP: 203.0.113.5 Source Translation Public IP Used Internal host's private IP is translated to public IP for outbound traffic

DNAT (Destination NAT)

DNAT stands for Destination NAT and is used when an external host with a public IP initiates a connection towards an internal/private network. The NAT device translates the public destination IP address to the private IP address of the internal host or server.

DNAT is commonly configured for Demilitarized Zone (DMZ) environments, where servers with private IP addresses need to be accessible from public networks. It performs a 1-to-1 static translation and supports port forwarding capabilities.

Key Differences

Aspect SNAT DNAT
Full Name Source Network Address Translation Destination Network Address Translation
Direction Internal to External communication External to Internal communication
Address Translation Translates source address (private to public) Translates destination address (public to private)
Routing Decision Applied after routing decision Applied before routing decision
Use Case Multiple internal hosts accessing Internet External hosts accessing internal servers
Translation Type Many-to-one (multiple private to single public) One-to-one (static mapping)

Common Use Cases

SNAT is typically used in corporate networks where multiple employees need Internet access through a single public IP address. DNAT is essential for hosting web servers, mail servers, or other services that need to be accessible from the Internet while maintaining private IP addressing internally.

Conclusion

SNAT enables internal hosts to access external networks by translating source addresses, while DNAT allows external hosts to reach internal services by translating destination addresses. Both are essential NAT techniques that work together to facilitate secure and efficient network communication.

Updated on: 2026-03-16T23:36:12+05:30

7K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements