Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a working VPN connection using NetworkManager, OpenConnect, and the network-manager-openconnect-gnome package, but I have to start it manually every time I connect to a network, and I have to enter my password manually each time.

How can I get it to connect automatically, and remember my password (securely)?

I have checked the 'Connect Automatically' box on the Configure VPN page, but this seems to have no effect. I've also got the 'Start connecting automatically' box checked in the pop-up box, and that does avoid the need to press the connect button in that window, but seems to have no part in kicking off the whole process in the first place. There is no option to remember the password in the window, but maybe there's one somewhere else?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

When setting up a VPN connection through Network Manager selecting the Connect automatically option should mean that the VPN does automatically connect, however this isn't working due to a bug: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/280571

It can still achieved though through workarounds, one way of doing this would be to use vpnautoconnect

  • Set up your VPN as normal through the network settings, making sure that Connect automatically is selected:

enter image description here

enter image description here

  • Select Preferences from the VPNautoconnect menu

enter image description here

  • Click the small arrow to create a new tab and select your wireless connection in the Parent Connection drop down menu, and your VPN in the VPN Connection drop down menu. Then click Save

enter image description here

enter image description here

Your VPN should now connect automatically whenever the selected wireless network is connected (if you use more than one wireless network you'll need to create a new tab in the preferences menu for each one you want to auto connect to a VPN whilst you are using).

share|improve this answer
    
Works great! Thanks. –  ams May 29 '12 at 2:07
    
I really like that swirly blur effect. +1 for that and a good answer! –  jrg Jun 8 '12 at 10:59
    
I followed your directions, and it worked. Now my VPN connection automatically attempts to reconnect. However, my password is not saved. How do you save the VPN password? I have found no relevant documentation with a clear answer after extensive Google searching for many hours. –  Kamil Slowikowski May 19 at 17:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.