Using DNS in iproute2
Posted
by
Oliver
on Server Fault
See other posts from Server Fault
or by Oliver
Published on 2012-06-07T15:57:40Z
Indexed on
2012/06/07
16:42 UTC
Read the original article
Hit count: 550
In my setup I can redirect the default gateway based on the source address. Let's say a user is connected through tun0 (10.2.0.0/16) is redirect to another vpn. That works fine!
ip rule add from 10.2.0.10 lookup vpn1
In a second rule I redirect the default gateway to another gateway if the user access a certain ip adress:
ip rule add from 10.2.0.10 to 94.142.154.71 lookup vpn2
If I access the page on 94.142.154.71 (myip.is) the user is correctly routed and I can see the ip of the second vpn. On any other pages the ip address of vpn1 is shown.
But how do I tell iproute2 that all request at e. g. google.com should be redirected through vpn2?
© Server Fault or respective owner