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 172.21.4.156 lookup custom

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

ip route add default via 172.27.0.9 dev tun0 table custom
en/ressources/astuces/policy_routing.txt · Last modified: 2013/12/07 17:45 (external edit)
CC Attribution-Noncommercial-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0