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
Quote:
|
echo 1 > /proc/sys/net/ipv4/ip_forward
|
#masquerade - ppp0 is the device name of my internet connection
Quote:
|
/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
Quote:
NETWORK=yes
..
..
GATEWAYDEV=eth0
|
# file: /etc/sysconfig/network-scripts/ifcfg-eth0
Quote:
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
Quote:
|
/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 ?