S 5.70 Network address translation (NAT)

Initiation responsibility: IT Security Officer, Head of IT

Implementation responsibility: Administrator

Network Address Translation (NAT) is a mechanism under which an active network component (usually a router) changes the IP address of a packet when forwarding the packet. The router stores the assignment of the internal address and the internal source port for the external address, destination port and the port which the router itself has chosen for the changed packet in a table, and converts the response packets accordingly.

NAT can be used for a variety of purposes:

Translation of the internal IP addresses to one or more officially registered IP addresses and vice versa is carried out using an address translation component. Proxies also have implicit address translation functionality, as the proxy only uses its official address externally and forwards the data packets to the relevant internal computers.

Address translation by routers or dedicated packet filters can be either static or dynamic. Static address translation is simple and fast. Every internal address is assigned exactly one external address. For this purpose, of course, exactly one external address is required for each internal address.

Today, it is more common to use dynamic address translation. It is essential especially when the number of internal IP addresses is larger than that of externally visible addresses. An allocation table, in which the internal addresses with their associated port number of a packet are allocated to an external address with a new port number, is maintained in the router or packet filter. Frequently, only one IP address which hides all the internal IP addresses by means of the port number allocation is made visible to the outside.

One consequence of dynamic address translation is that it is normally not possible to establish a connection to an internal computer from the Internet. If, however, this is to be possible, then the security gateway must support "destination NAT" and/or "port forwarding" (see below).

Certain services have to be given special treatment in relation to address translation (e.g. traceroute or ftp).

Access from outside under NAT

When establishing a connection from outside (e.g. in the case of queries to a web server), all packets that are directed to one particular port are translated at the NAT gateway and then forwarded to an appropriate port of the server. This mechanism is also referred to as "destination NAT" or "port forwarding". The NAT gateway deals with the response packets from the server in an analogous fashion.

Review questions: