[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Web openvpn.net

Re: [Openvpn-users] redirect-gateway + http-proxy + ppp problem

  • Subject: Re: [Openvpn-users] redirect-gateway + http-proxy + ppp problem
  • From: Laurent GUERBY <laurent@xxxxxxxxxx>
  • Date: Wed, 05 Dec 2007 23:54:44 +0100

Jan, many thanks for your help (private discussion)!

Following your directions, I ended up adding two scripts on my client:

$ cat /usr/bin/rrr2
traceroute -n -m 1 SOMEINTERNETIP 2>/dev/null|awk "{ print \$2 }"
$ cat /usr/bin/rrr3
route add -net netmask gw $(rrr2)

And I called "rrr3" after being ppp connected but before launching
openvpn and all went as expected! traceroute goes through the vpn server
first then to the internet.

I'm not sure if I'm moving around (say in a train) that the gateway IP
behind my ppp connection will stay constant so I don't know how the
openvpn client will behave. I will report when I get a chance.

I don't know if a solution exists to handle that kind of situation
more gracefully with openvpn, from the messages in this thread
it looks like I'm not alone with a routing table looking like:

#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    0      0        0 ppp0         U     0      0        0 ppp0

May be in this case openvpn should just use ppp0 interface for the
redirect-gateway since it's the only one available before the tunnel is
created? (Again I don't know much about how all this works :).


On Wed, 2007-12-05 at 13:32 +0100, Jan Just Keijser wrote:
> Hi Laurent,
> the messages seems pretty clear: when you're connecting using your ppp 
> interface then openvpn cannot determine the default gateway on your 
> network; you need to specify it explicitly or make sure that you *have* 
> a default gateway when connecting thru ppp.
> Laurent GUERBY wrote:
> > In the client logs in the ppp case I have a "cannot read current default
> > gateway from system" message:
> >
> >   
> the SERVERIP routing table shows the default GW:
> > >>>>>         UG    0      0        0 wlan0
> >   
> where as with PPP your routing table does not have any 'UG' entries:
> > #route -n
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> > UH    0      0        0 ppp0
> >         U     0      0        0 ppp0
> >   
> fix this and your openvpn connection should work...
> HTH,

Openvpn-users mailing list