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.
Code:
# Config information for eth0: Hint:Use ur real ipadd/subnet
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
# Config information for eth1: Hint:Use ur local ipadd/subnet
IPADDR[1]="192.168.0.1"
NETMASK[1]="255.255.255.0"
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""
# Default gateway IP address:
GATEWAY="eth0"
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
Code:
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
Code:
/etc/rc.d/rc.inet1 restart
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 file
Code:
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.