> Is there a way to to set default routes based on source IP.
> The situation is that I would like all pockets from source w.x.y.z/mk to
> have a default route of x and all other pockets to have default route y.
> Possible? If so what do I need to use?
Certainly possible. You'll need to enable advanced routing in the kernel and
use the new iproute2 tools.
Basically, you'll make a new rule saying that any packets from w.x.y.z should
look up a different routing table than main. That routing table has a single
entry (default) that sends it out route x.
something like this should do it:
ip rule add from w.x.y.z lookup table 200
ip route add default via x.x.x.x dev devname table 200
where x.x.x.x is the IP address of the interface that you want to route it out
on, and devname is the device name (eth0, ppp1, etc).
If you can't figure it out after looking at the docs, I'd be happy to get more