Alright, you have got 2 nic cards and as per the output of the ifconfig command, we see that both of them have their drivers installed. I expect to see eth0 too in the dmesg command too. Anyway, let's proceed.
I am assuming that you get your ipaddress
from you internet service provider through their dhcp server.
I am also assuming that your eth0
is connected to the dsl modem whereas eth1
is used to connect to your local area network.
First of all, we will configure /etc/rc.d/rc.inet1.conf
. Look in this for a section similar to the code below and make the changes indicated in red color. The text in blue color are just hints from my side.
# Config information for eth0: Hint:Use ur real ipadd/subnet
# Config information for eth1: Hint:Use ur local ipadd/subnet
# Default gateway IP address:
Now, we will edit your /etc/resolv.conf You might need to consult your isp to
get these values. Replace X.X.X.X with the ipaddresses of your dns servers
search yourispdomain.com # hint - your isp's domain
namserver X.X.X.X # your primary dns server
namserver X.X.X.X # your secondary dns server
Now, restart your network
And there u r done.
now, if you wish to share this connection with other users on your local area network,
run these commands. Remember, these rules are lost on every boot. So, if u want the connection to be share automatically, add these lines to your /etc/rc.d/rc.local
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
If you find any part of the above confusing, please feel free to ask.