Linux Policy Routing

Create a custom routing table

echo 200 custom >> /etc/iproute2/rt_tables

Route a source IP using the custom table

ip rule add from lookup custom

Add a rule to the table that change the default gateway to a VPN

ip route add default via dev tun0 table custom
en/ressources/astuces/policy_routing.txt · Last modified: 2013/12/07 16:45 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0