listen sayon i can't solve your problem like this but what i can do is tell you how things are done for internet sharing okay. hopefully some one better than me will show up and help you solve your problem.
first you check whether your network adapters are properly installed and detected: use the command
to see the nic's status;
eg o/p: eth0: negotiated 100baseTx-FD, link ok
next you set correct network addresses to all your network adapters:
ppp0: your isp provided ip address, gw and dns settings
eth0: a ip and netmask from the private ip range such as 192.168.0.1, use the
Code:
'setup' or 'netconfig'
command to do this or you can straight edit /etc/sysconfig/network-scripts/ifcfg-eth0 file.
next setup ip masquerading through your firewall(/etc/rc.d/rc.firewall):
Code:
## Load neccessary modules
/sbin/modprobe iptable_nat
/sbin/modprobe ipt_MASQUERADE
## Flush all existing rules
/sbin/iptables -F
/sbin/iptables -t nat -F
/sbin/iptables -t mangle -F
/sbin/iptables -X
## Accept all thats related and already established
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -i ! ppp0 -j ACCEPT
# only if both of the above rules succeed, use
#/sbin/iptables -P INPUT DROP
/sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT
# use this line if you have a static IP address from your ISP
# replace x.x.x.x with your static ip
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to x.x.x.x
# use this line only if you have dynamic IP address from your ISP
#/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o eth0 -j REJECT
Code:
chmod 755 /etc/rc.d/rc.firewall
/etc/rc.d/rc.firewall
next you will need to add a route
Code:
route add -net 192.168.0.0 netmask 255.255.255.0 gw x.x.x.x dev eth0
configure all your other workstations to use the following set of ip's
Quote:
static IP address : 192.168.0.3 to 192.168.0.254
subnet Mask : 255.255.255.0
Default gateway : 192.168.0.1
Primary DNS Server : the same as in ppp0
Secondary DNS Server: the same as in ppp0
|
i think that sums it up. see if you can setup your network on your own.