NAT and Firewall

Written by Mike on September 20, 2008 – 9:05 pm -

How does IP mapping for data transmission over networks work?

You probably know what TCP/IP is; any computer using TCP/IP will have a unique IP address by which data in the form of packets is sent and received from other computers. The process of passing data packets from one computer to another by analyzing the ”routing tables” to reach the destination is known as routing. A routing table is a database of defined rules that determines the best path for data packets as they go towards their destination IP address. The process of routing is performed by a device called a router. But IP addresses used for internal or private networks are not registered; they are referred to as local IP addresses. These addresses are used for data transmission within the LAN, and are not visible on the Internet. For data transmission from the internal network to the Internet, the local IP is registered as a global IP address by Network Access Translation (NAT). NAT provides security by hiding internal IP addresses, enables the use of more IP addresses without the possibility of IP conflicts, and multiple ISDN (Integrated Services Digital Network) connections appear as a single Internet connection. This provides a first line of defense, but because NAT only translates IP addresses, a firewall is usually used in conjunction with a NAT router for security against incoming data packets from the Internet. The firewall could be software or hardware.

In Some Detail: NAT

NAT is a standard that enables use of separate sets of IP addresses for internal and external traffic. The translation of local IP addresses to a global IP is done on a one-to-one (one internal address to one global address) or many to many-to-one (a group of internal address to one global address) basis while connecting to the Internet. NAT can be used by a computer, a router, or a firewall. NAT has several forms, such as static, dynamic, overloading, and overlapping. Static NAT translates any unregistered local IP on a one-to-one basis to a registered global IP address. The Internet Assigned Numbers Authority (IANA) has reserved three blocks of the IP address space for private networks:
(24-bit block)
(20-bit block)
(16-bit block)

Any enterprise can use such IP addresses, and these will be unique within that enterprise. When the enterprise needs to connect to the Net, it needs to get a unique global / public IP address from the Internet registry. That public IP address will never be assigned from the three blocks for private networks. As an example, will be translated as and used for external traffic. Dynamic NAT translates any local unregistered IP address to a registered global IP address from a group or range of global IP addresses. For example, will be translated to any of the global IP addresses ranging from to In the case of overloading, each IP address on the private network is translated to a registered IP address, but with a different port number. The internal IP might be in use by any other network. In some cases, the internal IP range might be a registered range in use by another network. Here, the NAT translates addresses to avoid potential conflicts. This is called overlapping. It can be done by using static NAT or by using DNS and dynamic NAT. Firewalls are intrusion protection systems to prevent packets from unsecured, unknown, or unauthorized locations coming in. Firewalls can be software or hardware. Software firewalls are installed inside the System OR Dedicated Server OR VPS (Virtual Private Server). Some good examples of Software Firewall which are widely used are IPtables, CSF etc. (For Linux Servers) and Windows default Firewall, Deerfield, Comodo etc. (For Windows Servers). NAT routers offer packet-filtering firewalls (hardware). These examine the source IP address and port, as well as the destination IP address and port, to determine whether the packet is to be accepted or dropped.

Hardware Firewalls

On a hardware firewall, user created or predefined rules about data packets to be blocked from specific TCP/IP ports are configured. The firewall uses a technique of packet filtering by which it examines the header of incoming packets to determine their source and destination. It is then determined whether to take in or exclude the packet. With hardware firewalls, only incoming traffic is restricted, and not outgoing traffic. So a malicious program such as a key logger, which has already entered the local network and is concealed as safe program, can send information to its destination. Also, at times, routing through the router is blocked, and peer-to-peer activity on the network is not possible if the private network uses a NAT-enabled router.

There is debate on whether NAT will be necessary, whether it will provide better security, etc. when IPv6 is implemented.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , ,
Posted in Dedicated Server Hosting, Linux VPS Hosting, Windows VPS | 2 Comments »

2 Comments to “NAT and Firewall”

  1. IPv6 - Internet Protocol Version 6 | Says:

    [...] not NAT? You might have heard of NAT (Network Address Translation). An office for example, might have a LAN, where 40 individual computers show up as just one IP to [...]

  2. ip routing enabled Says:

    [...] from WAN to set up using DHCP … You will finally be prompted to provide LAN IP information. …NAT and Firewall |How does IP mapping for data transmission over networks work? You probably know what TCP/IP is; any [...]

Leave a Comment


  • Subscribe Me

  • Tag Cloud

  • Archives