I am working on a 2 router system. The routers are connected via a dedicated link. Each router has a local network that it serves, and an internet provider. One internet provider is the default for all traffic. The other is new, and intended as backup, and use for hosting a couple sites.
I have the routers talking, and both can access the internet (through the default provider). Where I have a problem is routing traffic to a specific machine on the new provider.
For testing, I am sending ssh traffic to a netbook I hooked up to the network. I'm using tcpdump, and see the traffic come in through the provider. I see it hit the netbook. But all the traffic goes out the default route.
I know the problem lies in the policy rotuing, which I thought I had setup right. Since it's not working, I obviously missed something.
My policy for the new provider setup like this:
ip rule show
Code:
0: from all lookup local
32764: from all to 10.42.30.32/27 lookup net2
32765: from 10.42.30.32/27 lookup net2
32766: from all lookup main
32767: from all lookup default
ip route show table net2
Code:
10.42.30.32 dev eth2 scope link src 10.42.30.34
default via 10.42.30.33 dev eth2
If you need more, let me know. I did change the default to go out net2 for everything, and that worked. So this should work, in theory.
Thanks for the help.
Edit:
I should add, that all the traffic I see going out eth0 (my router link and default route) for my test ssh forward, the from is showing 10.42.30.34. So, judging by the ip rule show, it should be hitting the net2 table first.