got eth0 with gw 1.1.1.1 and ppp0 with gw 2.2.2.2,im trying to make 1 host to go always trough 2.2.2.2, so i did the following:
ip rule add from 192.168.0.1 to 0.0.0.0 table 7
ip route add default via 2.2.2.2 dev ppp0 table 7
then im sharing de internet connection with snat
iptables -t nat -A POSTROUTING -o $eth0 -s ! 192.168.0.1/32 -d ! 192.168.0.0/24 -j SNAT --to-source eth0.ip.address
and then
iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.1 -j SNAT --to ppp0.ip.address
(default route is 1.1.1.1 on eth0)
So.. if y do a traceroute from 192.168.0.1 to yahoo.com it hangs on the linux router... and i turned on a tcptrack on eth0 and i see the connection there? shouldnt be on ppp0?
if i change on the SNAT rule so ill snat the whole network then it goes trough eth0 and gets to yahoo.com...
what am i doing wrong?