Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 192.168.1.1 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.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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

share|improve this answer

Easy way is to install Firestarter firewall and use wizard to share your internet connection.

share|improve this answer
    
It's For Firewall, I want to do Natting as I mentioned. –  K.K Patel Aug 20 '12 at 6:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.