Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

OpenVPN routes lost on DHCP lease renewal

 
   Soft32 Home -> Linux -> Networking RSS
Next:  US Dept of Justice investigating Google's hiring ..  
Author Message
Jan_Thomä

External


Since: Jun 04, 2009
Posts: 1



(Msg. 1) Posted: Thu Jun 04, 2009 7:20 am
Post subject: OpenVPN routes lost on DHCP lease renewal
Archived from groups: comp>os>linux>networking (more info?)

Hi,

i have been working with OpenVPN for quite some time and have had
little issues. I am now working in an environment where most of the
OpenVPN routes are lost when the DHCP lease is renewed. This leads to a
"network deadlock", as the OpenVPN server (10.8.0.1) is still set up as
the default gateway, but all other routes have been removed, so the
server is practically unreachable. I have to restart the VPN connection
at that point. Since the lease is renewed every 10 minutes or so, VPN
is quite unusable in this environment. Is there a way I can prevent the
routes from being deleted when the lease is renewed, or do you know of
a script which tracks if the routes are there and restores them once
they disappear? Any help would be greatly appreciated.

Kind regards,
Jan
Back to top
Login to vote
Arno Schuring

External


Since: May 18, 2009
Posts: 5



(Msg. 2) Posted: Sun Jun 14, 2009 3:20 pm
Post subject: Re: OpenVPN routes lost on DHCP lease renewal [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jan Thomä wrote:
> Hi,
>
> i have been working with OpenVPN for quite some time and have had little
> issues. I am now working in an environment where most of the OpenVPN
> routes are lost when the DHCP lease is renewed.

Assuming a default Linux distribution, you're probably running the ISC
dhclient. In this case, take a look at /sbin/dhclient-script and
associated hooks (in Debian they are below /etc/dhcp3/). But there's
also udhcpcd (embedded), dhcpcd (bsd) and network-manager has its own
dhcp client, I believe. So: more info needed!

If the openvpn routes are permanent (and you are running the ISC
client), you might want to look into writing an exit hook for it so that
they are reconfigured automatically, this can even be done based on a
configuration parameter sent down from the server.

That said, routes should only be deleted if the hosts IP address has
changed. If they are deleted in case of a lease renewal as well, you
might want to file a bug with your distribution.

> Is there a way I can prevent the routes from being deleted when the
> lease is renewed, or do you know of a script
> which tracks if the routes are there and restores them once they
> disappear? Any help would be greatly appreciated.

This is an ugly kludge, but you might want to try to write a pair of
entry/exit hooks that save the routes on entry, and restore them on
exit. This solution is probably so ugly that no one would admit to
having written a script for it...


Good luck,
Arno
Back to top
Login to vote
Display posts from previous:   
Related Topics:
WiFi browsing for Windows, but not for Linux? - That seems to be the problem a colleague of mine is currently experiencing in France. Details here: ..

Setting up iwlwifi and wpa supplicant on Fedora 7 - Could someone give me the steps (script) to setup iwlwifi for WPA. I have iwlwifi installed from the Fedora..

VPN OpenSwan&Xl2tp problem with big udp packets - Hi all, I'm having a problem with my vpn server using openswan et xl2tp on a gentoo linux. All the tcp traffic seems....

Hacked, now trying to disinfect - Yeah, i know, it can't happen in Linux. But it has been happening to our work servers for several months. Due to poor....

How to receive DHCP issued routes (option 33) - Redhat 9 - how can I set up the client to recieve Option 33 issued routes as a DHCP client? Or is there nothing to set...

[Samba] lease broken message - I often get this message in the logs (Samba 3.0.1, SuSE 8.2, Linux 2.4.23, glibc 2.3.2): lease broken - owner pid =..
       Soft32 Home -> Linux -> Networking All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]