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

Re: [Openvpn-users] Linux: Is there a way to remove client tuninterface when Internet interface is unplugged?


  • Subject: Re: [Openvpn-users] Linux: Is there a way to remove client tuninterface when Internet interface is unplugged?
  • From: Heather Lockridge <heathlock_1997@xxxxxxxxx>
  • Date: Thu, 20 Dec 2007 13:22:29 -0800 (PST)

Yes.  After further testing I see that this does do what I need, although it takes several minutes for the tun0 interface to disappear after the cable is unplugged during testing.  

Les Miskell and jessica six had suggested this as well some days ago, but at first I didn't think this would work.

The question I need to decide is whether I want the overhead of my script running to detect this more quickly.

Thanks for the help!!!

Heather :)

----- Original Message ----
From: Darren Loher <dloher@xxxxxxxxxxxx>
To: openvpn-users@xxxxxxxxxxxxxxxxxxxxx
Sent: Wednesday, December 19, 2007 11:58:28 AM
Subject: Re: [Openvpn-users] Linux: Is there a way to remove client tuninterface when Internet interface is unplugged?

It sound like what you want is to remove "persist-tun" from your client
configuration.

This way when the client loses connection to the openvpn server, it will
remove the tun interface and associated routes.  This is particularly
good idea if you are using the redirect-gateway option since there are
cases when you might not be able to reach the openvpn server while the
old/stale tunnel interface is still up. (such as a default gateway
change)  :)

-Darren



-----Original Message-----
From: openvpn-users-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:openvpn-users-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Heather Lockridge
Sent: Friday, December 14, 2007 9:11 AM
To: Les Mikesell
Cc: jessica six; openvpn-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Openvpn-users] Linux: Is there a way to remove client
tuninterface when Internet interface is unplugged?

No, I only want the tun interface to disappear on the client if the
cable to the internet is disconnected.  Perhaps I misunderstand how to
use the the options provided by openvpn.

My solution add's overhead.

Perhaps I was not trying the right combination of ping-restart and
persist-tun?  Any thoughts?

Thanks,

Heather

----- Original Message ----
From: Les Mikesell <lesmikesell@xxxxxxxxx>
To: Heather Lockridge <heathlock_1997@xxxxxxxxx>
Cc: jessica six <jessica6_2000@xxxxxxxxx>;
openvpn-users@xxxxxxxxxxxxxxxxxxxxx
Sent: Thursday, December 13, 2007 4:01:07 PM
Subject: Re: [Openvpn-users] Linux: Is there a way to remove client tun
interface when Internet interface is unplugged?

Heather Lockridge wrote:
> Thanks to all your suggestions.  I wound up doing this outside of
openvpn.  I did a simple script run from cron that stops openvpn on the
client machine if an IP on the internet is not pingable.  By doing this,
I can stop the client openvpn if the ping doesn't get a reply.  This
also removes the tun0 interface which is what I want.  Then later if
that site does answer a ping, then I start openvpn again.
> 

Is there some reason you like that better than the keep-alive option 
that would do both for you?  Do you need the routes to go away when the 
connection is down?

-- 
  Les Mikesell
    lesmikesell@xxxxxxxxx



________________________________________________________________________
____________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
______________________
OpenVPN mailing lists
https://lists.sourceforge.net/lists/listinfo/openvpn-users

______________________
OpenVPN mailing lists
https://lists.sourceforge.net/lists/listinfo/openvpn-users