odysseus
2003-12-23, 01:48 AM PST
i have 2 linux boxes, and want both online while one should be the gateway for the other.
this is what i have done ON THE GATEWAY (192.168.0.1):
#enable ip-forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
#masquerade - ppp0 is the device name of my internet connection
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
this is what ive done ON THE CLIENT (192.168.0.1)(basically i think all i have to do is set the default rounte):
# file: /etc/sysconfig/network
NETWORK=yes
..
..
GATEWAYDEV=eth0
# file: /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.0.2
..
..
GATEWAY=192.168.0.1
after doing so, i still get "destination unreachable" when i try to ping 192.168.0.1 from 192.168.0.2
i also tried
/sbin/route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1 eth0,
but still "destination unreachable"
someone can help me ?
this is what i have done ON THE GATEWAY (192.168.0.1):
#enable ip-forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
#masquerade - ppp0 is the device name of my internet connection
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
this is what ive done ON THE CLIENT (192.168.0.1)(basically i think all i have to do is set the default rounte):
# file: /etc/sysconfig/network
NETWORK=yes
..
..
GATEWAYDEV=eth0
# file: /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=192.168.0.2
..
..
GATEWAY=192.168.0.1
after doing so, i still get "destination unreachable" when i try to ping 192.168.0.1 from 192.168.0.2
i also tried
/sbin/route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1 eth0,
but still "destination unreachable"
someone can help me ?