I'm trying to setup a linux box as router and I'm a little confused on how the following rules will affect the packets.
e.g. In routing table I can have
default via 10.10.1.1 dev eth0 src 192.168.1.1
which changes the source IP address of the packet to 192.168.1.1
And in iptables, I can have
-A POSTROUTING -s 192.168.0.0/255.255.0.0 -o eth0 -j SNAT --to 192.168.1.1
Which also seems to ask next hop that return packet should go to 192.168.1.1
So what's the difference?