Notices


Reply
Thread Tools
Posts: 1,208 | Thanked: 1,028 times | Joined on Oct 2007
#11
latest openvpn-applet (0.6.1) should handle openvpn reconnection as long as your openvpn configuration doesn't drop root permissions
 
Posts: 74 | Thanked: 34 times | Joined on Jan 2008
#12
but I also need openvpn to stop when at home . so lan routing wont have loops
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#13
Originally Posted by Joorin View Post
That's something else, I'd say. And much easier, if I were to guess.
I'll have to disagree. Just to clarify - when there's an OpenVPN reconnect OpenVPN is able (as it should) to keep this hidden from the application layer (which just sees a connection through a TUN device). And if you look at the openvpn log messages (all this should be easier to monitor if you do it on a desktop computer) then you'll see that when this happens OpenVPN goes through the whole connection protocol again.

So, I believe that _technically_ it shouldn't be difficult for OpenVPN to disconnect the physical layer and re-connect through another physical layer (i.e. when you disconnect from one AP and reconnect via another): The re-connect phase should be the same. But that doesn't mean there's actual support for it.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#14
Originally Posted by TA-t3 View Post
I'll have to disagree. Just to clarify - when there's an OpenVPN reconnect OpenVPN is able (as it should) to keep this hidden from the application layer (which just sees a connection through a TUN device). And if you look at the openvpn log messages (all this should be easier to monitor if you do it on a desktop computer) then you'll see that when this happens OpenVPN goes through the whole connection protocol again.

So, I believe that _technically_ it shouldn't be difficult for OpenVPN to disconnect the physical layer and re-connect through another physical layer (i.e. when you disconnect from one AP and reconnect via another): The re-connect phase should be the same. But that doesn't mean there's actual support for it.
I'm suspecting a case of miscommunication here.

Initially, I interpreted OP as wanting to be able to keep his TCP/IP connections alive even if the IP address for wlan0 changed. I still think this is really hard to do.

After getting more details, OP wants the VPN to do an ordinary reconnect which is much easier to do since it's part of "normal procedures". This is what I'm commenting with "much easier".
 
Posts: 74 | Thanked: 34 times | Joined on Jan 2008
#15
as a resault of this discution I came up with this http://talk.maemo.org/showthread.php?p=658789 solution , see post 2.

I now ask this: how should I use udhcpc?
should I use it with --now, so it will quit after establishing an IP?
or should I leave it alive updating the IP while changing physical connections?

Originally Posted by TA-t3 View Post
I'll have to disagree. Just to clarify - when there's an OpenVPN reconnect OpenVPN is able (as it should) to keep this hidden from the application layer (which just sees a connection through a TUN device). And if you look at the openvpn log messages (all this should be easier to monitor if you do it on a desktop computer) then you'll see that when this happens OpenVPN goes through the whole connection protocol again.

So, I believe that _technically_ it shouldn't be difficult for OpenVPN to disconnect the physical layer and re-connect through another physical layer (i.e. when you disconnect from one AP and reconnect via another): The re-connect phase should be the same. But that doesn't mean there's actual support for it.
 
Posts: 1 | Thanked: 0 times | Joined on Aug 2010
#16
So in order to maintain openvpn even when changing from 3G to wifi and back agin, I just have

#!/bin/sh

OPENVPN=/etc/init.d/openvpn

if [ ! -x $OPENVPN ]; then
exit 0
fi

$OPENVPN restart client
in /etc/network/if-up.d/openvpn - if you have multiple vpns, you could do a loop as shown earlier in the thread - but I only have one, called 'client' and this works perfectly for me. I keep it up whilst on my home wifi, I don't have any routing loops ;-) I f you do have such issues, again an earlier post shows how you can decide which network you've just landed on and decide there.

You don't need anything in /etc/networks/if-down.d at all
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:37.