Ubuntu – NATTING in Ubuntu Server

dhcpinternet connectionnat;networkingserver

My Server has two NIC, One is connected to the Internet Service provider with dhcp ip (dynamically change) given by ISP and other NIC is connected with local Switch with IP. Now I want to set up network with such that computers connected with LAN can connect Internet through server. Server will be work as a router. How should I make such configuration that All traffic passed by NIC 2 within a single IP and ported at IP address of NIC 1 which is Dynamically given by My ISP?

Thanks in advance.

Best Answer

Network-address-translation (NAT) on a Linux system with Iptables rules so that the system can act as a gateway and provide Internet access to multiple hosts on a local network using a single public IP address. This is achieved by rewriting the source and/or destination addresses of IP packets as they pass through the NAT system.

Minimum Requirements are any Linux OS, Iptables and Two Network interface card.

  1. Configure eth0 for Internet with a Public IP
  2. Configure eth1 for LAN with a Private IP (Internal private network)
  3. DNS Configuration
  4. NAT configuration with IP Tables.....Read On1

You may also want to look at NAT Setup in Ubuntu Server

1Source:NAT configuration with iptables in Ubuntu

Related Question