From wikistone
(Created page with "==Debian== Assuming two interfaces (eth0 and eth1) on different subnets. Add tables to /etc/iptables2/rt_tables <pre> # echo "table0" >> /etc/iptables2/rt_tables # echo "tabl...") |
|||
| Line 12: | Line 12: | ||
post-up ip route add default via [eth0_gw] table table0 | post-up ip route add default via [eth0_gw] table table0 | ||
post-up ip rule add from [eth0_ip] lookup admin | post-up ip rule add from [eth0_ip] lookup admin | ||
| − | post-up ip route add default via [eth1_gw] table | + | post-up ip route add default via [eth1_gw] table table1 |
post-up ip rule add from [eth1_ip] lookup exede | post-up ip rule add from [eth1_ip] lookup exede | ||
</pre> | </pre> | ||
Revision as of 11:54, 20 April 2014
Debian
Assuming two interfaces (eth0 and eth1) on different subnets.
Add tables to /etc/iptables2/rt_tables
# echo "table0" >> /etc/iptables2/rt_tables # echo "table1" >> /etc/iptables2/rt_tables
Add rules to /etc/network/interfaces
post-up ip route add default via [eth0_gw] table table0 post-up ip rule add from [eth0_ip] lookup admin post-up ip route add default via [eth1_gw] table table1 post-up ip rule add from [eth1_ip] lookup exede