Re: Two routes to a host: how to make sure which noe is used when?
- From: Clifford Kite <kite@xxxxxxxxxxxxxxxx>
- Date: Fri, 24 Nov 2006 22:08:10 -0600
Stefan Monnier <monnier@xxxxxxxxxxxxxxxx> wrote:
I recently bumped into a problem with my VPN:
I've setup my networking as follows:
+-----------+ +----------+
| mymachine |---192.168.1.13--> | myrouter |---> The world
+-----------+ +----------+
|
| +-----------------+
+--vpnNNN.domain--> | Some VPN server |---> *.domain
+-----------------+
Some IP range (corresponding to *.domain) goes through the VPN,
but the default routing rule is to go straight to my router.
Plus some addresses in *.domain are special cased to go via the
router: these are machines visible from outside and I don't want
connections to these machines to die/hang when I start/stop the
vpn tunnel. One of those addresses is the VPN server itself.
I.e. the routing table looks like this:
% route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
AAA.BBB.CCC.DDD 192.168.1.1 255.255.255.255 UGH 0 0 0 eth1
AAA.BBB.EEE.FFF 192.168.1.1 255.255.255.255 UGH 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
AAA.BBB.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
%
AAA.BBB.CCC.DDD is the VPN server and AAA.BBB.EEE.FFF is the IMAP server.
This usually works just dandy, except when AAA.BBB.EEE.FFF or
AAA.BBB.CCC.DDD tries to connect to my VPN-address (i.e. vpnNNN.domain):
- the packets coming from toto.domain reach me fine through the VPN.
- but my replies seem to be sent via the router.
So replace the redundant host gateway host routes (UGH) through eth1
on vpnNNN.domain with host routes (UH) to the same IP addresses through
the PPP interface instead. The configuration commands for those routes
belong in /etc/ppp/ip-up so that they are regenerated each time the
interface is recreated.
Just ignore that person waving host routes if this makes no sense at all
to you - he just doesn't really understand what's what.
--
Clifford Kite
/* For every credibility gap, there is a gullibility fill.
-- R. Clopton */
.
- Follow-Ups:
- Re: Two routes to a host: how to make sure which noe is used when?
- From: Stefan Monnier
- Re: Two routes to a host: how to make sure which noe is used when?
- References:
- Two routes to a host: how to make sure which noe is used when?
- From: Stefan Monnier
- Two routes to a host: how to make sure which noe is used when?
- Prev by Date: Re: How to set default gw not by route command in linux?
- Next by Date: Re: How to set default gw not by route command in linux?
- Previous by thread: Re: Two routes to a host: how to make sure which noe is used when?
- Next by thread: Re: Two routes to a host: how to make sure which noe is used when?
- Index(es):
Relevant Pages
|