Chumash ipsec0~~~~~~~~~~~~~~ipsec0
| / . \
(Sunset) West . East Pequot
| / \ . / \ |
router===eth0 eth1-----\ . /-----eth1 eth0===(Sunrise)
\ (cloud)
firewall------------------/ \
foo.net
2 from.this.hostto your /etc/iproute2/rt_tables file. The commands on West will include things like
ip rule add iif lo table from.this.host priority 500Also, don't forget to do
ip route add $SunriseNet table from.this.host \
dev ipsec0 src $WestPrivateIfcAddr
ip route flush cacheat the end of your setup script; otherwise changes will take effect only after some maddeningly irreproducible delay.
ip route get ....to help find the routing information in a very natural way. Without using iproute2, it is unbelievably painful to extract this information from the routing tables. So this is yet another reason why we like iproute2.
This document was translated from LATEX by HEVEA.