Static NAT is a feature which is available on routers and firewalls. The main use of the feature is to provide one to one mapping with two IP addresses. The concept and use of static nat is illustrated with an example below. An organization has a Web server. The LAN IP address of the web server is 192.168.1.5. The organizations wants users on the internet to access the Web server. For this purpose, the organization requires a public IP address ( Say , A.B.C.D). The public IP address is then mapped with the internal IP address of the Web server , which is 192.168.1.5. This configuration is performed on the router. The feature on the router which allows this configuration is known as static nat.
After static nat is setup, users on the internet, access the web server with the public ip address. When the users request reaches the router, the request is forwarded to the LAN ip address of the web server. When the web servers sends back the response, it passes through the router, and goes out with the public ip address (A.B.C.D).The user would be totally transparent of the internal processes. The details on how static nat works internally is provided below.
When the packet from the user to the web server reaches the router, the static nat which is setup on the router would re-write the destination ip address in the packet with the web servers lan ip address. When the response packet from the web server reaches the router,it would re-write the source ip address in the packet with the public ip address of the web server. When the packet reaches the user, it would be contain the web servers public ip address.