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

[Openvpn-users] Routing problems


  • Subject: [Openvpn-users] Routing problems
  • From: "Andrew Alston" <aalston@xxxxxxxxxxxxxx>
  • Date: Thu, 20 Jan 2005 09:14:05 +0200

Hi All,
 
I'm wondering if anyone can help me out.  Im currently running a FreeBSD openvpn server at work and OpenVPN clients on various windows boxes on the outside.  Im using the dev tun mode, and all works fine, the tunnel comes up, etc etc
 
The problem is this, when I push the default gateway to the windows boxes, the boxes recieve the default gateway and promptly lose connection to the vpn server unless I have first manually added a route for the vpn server box out of the window boxes original default gateway.  This is a real pain as these are adsl links and the default gateways before establishing the vpns change all the time, so before I establish the vpn on the windows boxes I have to do a netstat -nr, then a route add vpnserver <gateway> with the gateway being the boxes current default gateway, I then establish the vpn link and the default route changes and all works.
 
Dont add the manual static route first the box forgets how to connect to the vpn server and everything dies horribly.
 
Is there any way I can automate the addition of that static route to a dynamic gateway like that?
 
Thanks
 
Andrew