Understanding NAT |
Network Address Translation (NAT) OverviewThe Microsoft implementation of an address translation feature is called Network Address Translation (NAT). NAT can be used to enable computers on a network such as in small offices or home offices (SOHOs) to have a common Internet connection using a single public IP address. NAT translates IP addresses and associated TCP/UDP port numbers on the private network to public IP addresses which can be routed on the Internet. Often, the size of the network and the security requirements of the network would dictate whether NAT is used. Networks that do not require an implementation of a firewall solution or a proxy server solution can use NAT to provide basic Internet connectivity. Through NAT, host computers are able to share a single publicly registered IP address to access the Internet. With NAT, all outgoing packets are forwarded to the NAT server. At the NAT server, the source address of these outgoing packets are modified, and then forwarded to the Internet. All incoming packets are transmitted to the NAT server. At the NAT server, the addresses of the packets are changed to internal IP addresses, and are then returned to the source which sent the packet. The computer that has NAT installed can be configured as either of the following:
In Routing and Remote Access Service (RRAS), NAT can be used to provide basic Internet connectivity for small offices or home offices. NAT also offers a number of security features which can be used to secure the network resources on your private network. In addition, DNS queries can be sent to a DNS server defined in NAT. NAT also supports a DHCP-compatible IP configuration. With Windows Server 2003, the NAT server can support the following services or components:
The existing network would determine which services you need to enable when you install NAT and configure the NAT server. For instance, if you have existing DNS and DHCP servers, you can still proceed with using these servers when NAT is enabled. The NAT service is actually integrated with the router that changes the information of the originator in packets prior to them being forwarded to the Internet. NAT can be configured through either of the following components:
A Windows Server 2003 server configured with either of the following services can act as the NAT server:
As mentioned previously, NAT translates IP addresses and associated TCP/UDP port numbers on the private network to public IP addresses which can be routed on the Internet. When this translation occurs, NAT assigns a unique port number to the session as well. A client computer is mapped to a single public IP address assigned by the ISP of the organization or assigned by the Internet Network Information Center (InterNIC). Through this mapping, NAT is then able to return responses to the correct client computer. Information on these mapping are stored in the NAT Session Mapping table. The default configuration is that NAT translates IP addresses and TCP/UDP ports in the IP datagrams, which in turn result in the changing of these fields within the IP, TCP, and UDP headers:
Windows Server 2003 includes support for L2TP/IPSec VPN connections to function with NAT. You can also use a NAT editor for a few applications that do not contain IP addresses/port information within its header. Windows Server 2003 includes the NAT editors listed below:
Understanding the Limitations of NATThere are a few protocols that NAT is unable to perform network address translation for. For NAT to work and perform network address translation, it needs the IP information or port number information in the IP header and TCP header of packets. NAT uses IP addresses and the TCP port and UDP port within the TCP header, UDP header, and IP header to translate NAT traffic. While you can use a NAT editor to translate FTP traffic through a NAT system, this is not true for all protocols. A NAT editor only works for a few protocols such as FTP and PPTP. The protocols that are basically unable to pass NAT, is probably one of the most significant limitations of NAT. A few limitations of NAT are listed here:
Understanding How NAT WorksNAT works transparently to clients. This means that clients are not aware that NAT is functioning. A client is basically configured with the address of the NAT server as its default gateway. Hence, when the client sends an outgoing packet, the packet is forwarded to the NAT server. When the NAT server receives the packet, it performs the following functions:
The NAT Session Mapping TableThe information contained in the NAT Session Mapping table enables NAT to return responses to the correct client computer. The information stored in the NAT Session Mapping table is listed here:
Understanding the Differences between NAT and Internet Connection Sharing (ICS)Internet Connection Sharing (ICS) is another feature integrated with Windows that provides Internet connectivity to hosts using an interface. ICS provides a single public IP address to connect to the Internet, fixed address range for hosts, DNS proxy for name resolution, and automatic IP addressing. ICS is also easy to configure. While a NAT implementation through Routing and Remote Access is the recommended approach, you can use Internet Connection Sharing for exceptionally small networks. You can use ICS to connect the whole network to the Internet. This is due to the ICS feature providing a translated connection - all computers can access resources on the Internet. Much like NAT, when ICS is used, private IP addresses are hidden from the public network. Public external addresses are used over the public network. While NAT includes the Basic Firewall feature that only allows response traffic to be forwarded to the private network, ICS includes the Internet Connection Firewall service for the same functionality. One of the main features of using ICS is that it is preconfigured. ICS automatically configures the internal address of the computer hosting the shared connection as 192.168.0.1. Internal clients are assigned addresses in the 192.168.0.0/24 address range. Internal clients exist on the identical physical subnet. All internal clients point to the ICS computer for DNS resolution. The shared external interface has a single public address. With a NAT implementation, the NAT server can be configured with any private IP address as its internal address. You can also disable the DNS proxy and DHCP server features if you have a DNS server and DHCP server configured within your environment. With NAT, you can use multiple interfaces. The shared external interface can be configured with a single public address or with multiple public addresses. You can install ICS using Network And Dial-Up Connections. NAT is installed through the Routing And Remote Access console. NAT Design RequirementsA few NAT-specific design requirements are listed here:
Designing a NAT StrategyThe factors that should be included when you define and design a NAT strategy are listed below:
When client computers access resources on the Internet, they use fully qualified domain names (FQDNs) which need to be resolved to IP addresses by DNS servers. You therefore need to determine which method will be used for DNS name resolution for client computes that need to access the Internet. The methods which you can use to define the DNS server which clients can use to resolve fully qualified domain names (FQDNs) are listed here:
The advantages and disadvantages of using certain IP configuration methods are discussed now. The information provided can be useful when you need to decide on the IP configuration method to use with your NAT design. The advantages of using the NAT IP address assignment feature as the IP configuration method are listed here.
The disadvantage of using the NAT IP address assignment feature is that it is only available for DHCP clients. The advantages of using a DHCP server as the IP configuration method are listed next:
The disadvantages of using a DHCP server as the IP configuration method is listed below:
The advantages of using Automatic Private IP Assignment (APIPA) as the IP configuration method are listed here:
The disadvantages of using Automatic Private IP Assignment (APIPA) as the IP configuration method is listed below:
The advantage of using manual configuration as the IP configuration method is listed here:
The disadvantages of using manual configuration as the IP configuration method is listed below:
NAT Server Placement and NAT Server Requirements The NAT server should reside on the private network, and should have the following components:
A few recommendations for placing NAT servers within your environment are listed here:
To improve NAT server performance and optimize your NAT server hardware, consider the following recommendations:
NAT SecurityNAT does provide some security features that you can use to secure your private internal network and its resources from unauthorized access. Remember that NAT should not be used an alternative to implementing a firewall solution, if necessary. While NAT security is on the whole sound, you can use the security features provided by NAT to enhance security of your NAT implementation further. The security requirements of the organization should be used as the basis for implementing a few NAT security features. One of the primary objectives of implementing NAT security should be to restrict inbound traffic on the NAT server. Routing and Remote Access Service (RRAS) IP packet filters can be used to restrict incoming or outgoing IP address ranges based on information in the IP header. You can configure and combine multiple filters to control network traffic. A few important characteristics of IP packet filters are listed below:
Unwanted traffic that should be filtered usually includes:
When to use IP packet filters:
With NAT, you can configure two types of IP packet filters. When defining criteria for the packet filters, you can use whatever combination of IP header information. The types of IP packet filters configurable for NAT are:
There may be occasions when you want specific Internet users or VPN users to access resources on the private network, or access a Web server residing on the private network. The methods which you can utilize to map external public IP addresses and ports to private IP addresses and private ports so that internal private resources can be accessed are discussed here:
blog comments powered by Disqus |
Discuss Understanding NAT in the forums.

