Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server with two NIC cards. Right now eth0 is connected to my router to my ISP. But i want to setup eth1 as my LAN so deliver an internet connection from the server to my laptop.

How can i setup my eth1 as a LAN while my eth0 is a WAN.

I am running CENTOS 6.4 terminal.

share|improve this question

echo 1 > /proc/sys/net/ipv4/ip_forwarding

will enable IP forwarding. You need to put this in a startup script for it to persist after boot. You can also set this kernel setting in sysctl.conf (wherever it is on CentOS).

You also need to look into iptables to set up some basic security, as well as NAT if you need it.

share|improve this answer
Its not working I tried making settings in the eth0 and eth1 – sonicboom Jun 26 '13 at 19:15
Try flushing all iptables rules Also make sure all machines behind this one have a static IP in the same subnet as your eth1, or you could install and configure a DHCP server such as isc-dhcp-server or udhcpd on this system. – LawrenceC Jun 26 '13 at 19:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .