This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Automatic VPN connect/reconnect

Tags: None
(comma "," separated)
haakon
Registered Member
Posts
10
Karma
0

Automatic VPN connect/reconnect

Thu May 17, 2012 3:17 pm
Hi all,

Kubuntu user here, on KDE 4.8.3.

I'm accessing the internet through an OpenVPN server. I've added it in the Network Manager plasmoid, and it connects just fine when I ask it to. Wonderful!

However, even though I have ticked the "Connect automatically" checkbox, it does not connect automatically. When I log in, the wireless connects automatically, but then I have to connect the VPNhttp://forum.kde.org/posting.php?mod ... 8&p=222452 manually. The same is true when the laptop wakes up from sleep. This is quite annoying! I've tried to make both the wifi and the VPN a "system connection", but no difference. There is no password required for the VPN, and I've selected the "Not Required" password option.

Any suggestions?

Update: This *could* be related to a bug in NetworkManager:
https://bugzilla.gnome.org/show_bug.cgi?id=622868
https://bugzilla.gnome.org/show_bug.cgi?id=349151
haakon
Registered Member
Posts
10
Karma
0

Re: Automatic VPN connect/reconnect

Thu May 17, 2012 3:57 pm
I solved (or, rather, worked around) this problem by using the short script given here: https://bugzilla.gnome.org/show_bug.cgi?id=349151#c43

Fill in the connection names in the script, and save it as /etc/NetworkManager/dispatcher.d/02vpn (the 02vpn name is up to you). Make it executable, and this script will be run whenever there's a change in the status of your connections. So if your VPN goes down, it will reconnect, and if your wifi goes down, it will try to reconnect the VPN. So it's a little blunt weapon, but it seems to do the job until NetworkManager can properly support VPN reconnects.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]