Re: split routing / policy routing

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you a lot Joel, I got it to work!

I have a few things I would like to clarify, though, since my solution
differs slightly from yours.

It only works for me if I remove this from my rules:

32764:  from all iif ppp2 lookup Homenet

, hence these are now my rules

$ ip rule ls
0:      from all lookup local 
32764:  from all iif eth1 lookup Homenet 
32766:  from all lookup main 
32767:  from all lookup default

With the above line, I would still be connected to the server, but not
be able to ping any remote address.

This is my Homenet table:

$ ip route ls table Homenet
default dev ppp2  scope link 
193.168.2.0/24 dev eth1  scope link


Also, I noticed something weird about the iptables behaviour. My setup
is as follows:

iptables -t nat -A POSTROUTING -o ppp1 -j SNAT --to-source=my.st.i.p
iptables -t nat -A POSTROUTING -o ppp2 -j MASQUERADE

Now when testing with your settings I noticed that when I add "-s
192.168.2.1/24" to the second line, as corresponding to your
configuration, it would work as well but pinging google.com would take
me 14-15ms instead of 9. 

Could that slow down the traffic that badly? What exactly is the
difference between the two?

Thanks for the help

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux