Fundamentals of NAT

Date: Apr 2, 2012

Return to the article

Network Address Translation is critical in today’s networks due to the depletion of IPv4 IP addresses for use on the public Internet. While NAT breaks the fundamental tenant of the Internet end to end, it does provide a measure of security. In this article, we are going to examine NAT in its various forms.

There's a very good chance that you are using Network Address Translation (NAT) right now and most people are not even aware of it. When the IPv4 address space was originally developed everyone thought that there would be more than enough available addresses to cover all eventual needs, but with the veritable explosion of internet users and the ever increasing number of home networks, the number of available IP Addresses turned out to be insufficient to the task at hand. So what does NAT have to do with the ever expanding size of the internet? The answer is: EVERYTHING!

So what does NAT have to do with network security? NAT breaks the end-to-end IP/TCP model. More specifically, dynamic NAT automatically creates a FIREWALL between our internal network and any outside networks, to include the largest external network in the world[md]the internet. Basically, this means that a host on an external network cannot connect to an internal host unless that host has initiated an outbound session. This means that an internal user can browse the internet, and download files; but an external host cannot initiate a session to an internal IP Address and use it to connect to internal devices or services. In this blog we are going to explore the security aspects of this technology.

NAT as a Firewall

NAT translates the addresses of hosts behind a firewall or router and is normally used for internal networks that have unregistered (non-routable) IP addresses. NAT will translate these unregistered addresses into routable addresses assigned to outside networks. Outside networks are most usually referred to as public networks, and NAT allows non-routable or unregistered IP address spaces to connect to the web while providing added security. With Cisco IOS, NAT translation is used by a device that sits between the private, or inside, network and the outside, or public, network. NAT has many forms and works in many ways:

NAT Terminology

Before we even attempt to look at how to configure NAT on a router or a Firewall, we need to become familiar with the terminology used in the NAT environment.

Configuring Static NAT

Here we will look at what is involved in configuring Static NAT on a Cisco router. Static NAT is pretty straight forward. Remember this is most commonly used for translating addresses on a one-to-one basis. This is accomplished via a three-step process:

  1. Step 1: Designate at least one NAT inside interface.
  2. R1(config)# interface fastethernet0/1
    R1(config-if)# ip address 192.168.100.1 255.255.255.0
    R1(config-if)# ip nat inside
  3. Step 2: Designate at least one NAT outside interface.
  4. R1(config)# int serial0/0
    R1(config-if)# ip address 10.10.10.100 255.255.255.0
    R1(config-if)# ip nat outside
  5. Step 3: NAT the source IP to the outside IP Address.
  6. R1(config)# ip nat inside source static 192.168.100.1 172.1.1.1
    R1(config)# ip nat inside source static 192.168.100.2 172.1.1.2
    R1(config)# ip nat inside source static 192.168.100.3 172.1.1.3

This configuration will result in the IP Addresses 192.168.100.1 to 192.168.100.3 being translated to 172.1.1.1, 172.1.1.2 and 172.1.1.3 respectively.

Configuring Dynamic NAT

Dynamic NAT configuration is only slightly more complicated than the Static NAT configuration we just looked at. In its simplest form, dynamic NAT is a four-step configuration process:

  1. Step 1: Designate at least one NAT inside interface.
  2. R1(config)# interface fastethernet0/0
    R1(config-if)# ip nat inside
  3. Step 2: Designate at least on NAT outside interface.
  4. R1(config-if)# interface serial0/0
    R1(config-if)# ip nat outside 
  5. Step 3: Create a pool of Public IP Addresses.
  6. R1(config)# ip nat pool PUBLIC 222.2.2.2 222.2.2.5 prefix-length 29

    This defines the range of IP Addresses that will be handed out by the router to our internal hosts trying to connect to the Internet. Each time a host sends a packet destined for the Internet, the router will automatically allocate one of the Public IP addresses for the duration of the browser session. When the session is over, the NAT entry will timeout and the Public IP address will be returned to the pool.

  7. Step 4: Create an Access Control List (ACL) that will include the local hosts or network(s).
  8. R1(config)# ip nat inside source list 100 pool PUBLIC 
    R1(config)# access-list 100 remark == [Control NAT Pool Service]== 
    R1(config)# access-list 100 permit ip 192.168.0.0 0.0.0.255 any

    This ACL will be applied to the NAT pool named 'PUBLIC', and control what hosts will be assigned Public IP address and therefore able to access the Internet.

Configuring NAT Overload (PAT)

NAT Overload is the most common NAT deployment used in Small Office/Home Office networks. NAT Overload is a variation of Static or Dynamic NAT with a few enhancements. By this point we have an understanding of how both Static and Dynamic NAT work so we can jump right in.

Overloading implies that a single public IP Address can be used by multiple internal hosts simultaneously. This is done by translating source UDP/TCP ports in the packets and keeping track of them within a NAT translation table. We will look at a typical NAT configuration found in most small networks. In its simplest form we are looking at a four-step process:

  1. Step 1: Designate at least one NAT inside interface.
  2. R1(config)# interface fastethernet0/0
    R1(config-if)# ip nat inside
  3. Step 2: Designate at least one NAT outside interface.
  4. R1(config-if)# interface Serial0/0
    R1(config-if)# ip nat outside 
  5. Step 3: Create an Access Control List (ACL) that will include the local hosts or network(s).
  6. R1(config)# ip nat inside source list 100 pool PUBLIC 
    R1(config)# access-list 100 remark == [Control NAT Pool Service]== 
    R1(config)# access-list 100 permit ip 192.168.1.0 0.0.0.255 any

    This defines the range of IP Addresses that will be handed out by the router to our internal hosts trying to connect to the Internet.

  7. Step 4: Enable NAT overload and bind it to the outside interface.
  8. R1(config)# ip nat inside source list 100 interface serial 0/0 overload

    From this point the configuration will create PAT translations to allow the users in the network 192.168.1.0/24 to access the public internet.

Displaying the NAT/PAT translation table

The network translation table can best be viewed by using the 'show ip nat translation' command:

R1#show ip nat translation
Pro    Inside global           Inside local             Outside local             Outside global
tcp    171.71.1.1:3598     10.10.10.2:3598    198.133.219.25:80   198.133.219.25:80
tcp    171.71.1.1:3612     10.10.10.3:3612    198.133.219.25:80   198.133.219.25:80
tcp    171.71.1.1:3616     10.10.10.4:3616    198.133.219.25:80   198.133.219.25:80
tcp    171.71.1.1:3620     10.10.10.5:3620    198.133.219.25:80   198.133.219.25:80
R1#

We can see that this table indicates that multiple packets have passed through R1 all destined to port 80.

Conclusion

We have looked closely at the anatomy and terminology of Network Address Translation protocol. We have configured Static and Dynamic NAT on Cisco routers. In addition to this, we have learned how to control the Dynamic NAT service using ACLs as well as how to obtain detailed statistics on the NAT process itself.

800 East 96th Street, Indianapolis, Indiana 46240

sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |