Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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 adminsehow.com/2009/08/how-to-clear-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. –  ultrasawblade Jun 26 '13 at 19:50
add comment

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.