Automatically Start VPN Connection

10 Antworten [Letzter Beitrag]
davidpgil
Offline
Beigetreten: 08/26/2015

Hello everyone. I am using NordVPN with Trisquel 7. I would like to automatically start an OpenVPN connection when I login. Can anyone help me find a clear answer this?

Web searches seem to have many ways of going about it but none of them seem clear to me. Ideally I would like to use a method that will connect to one of the VPN connections that have already been added to the GUI of the default Network Connection app that Trisquel 7 uses.

Having started with GNU/Linux only 1+ years ago, I am still learning quite a bit. Id appreciate any help you can provide.

Regards,

David

Magic Banana

I am a member!

I am a translator!

Offline
Beigetreten: 07/24/2010

See https://nordvpn.com/tutorials/linux/openvpn/

I am pretty sure NetworkManager can be configured to automatically connect to the VPN. If not, you can probably "Add" the proper command line to the "Startup Applications" in the "System Settings".

EDIT: it looks like a bug in NetworkManager actually does prevent its option to auto-connect from working: https://askubuntu.com/questions/328823/vpn-autoconnect

Mangy Dog

I am a member!

I am a translator!

Offline
Beigetreten: 03/15/2015

Network Manager > Modify > General Settings > Connect Automatically to this VPN > (save settings)

(no bug for me)

davidpgil
Offline
Beigetreten: 08/26/2015

Are you using Trisquel 7 Default Desktop? @Mangy ? I dont see that option. How are you opening "Network Manager"? The Trisquel 7 default Network Manager does not have that option as far as I see.

davidpgil
Offline
Beigetreten: 08/26/2015

@Magic Im using the default Trisquel 7 Desktop, not Unity. There is not option for this in the Trisquel 7 desktop. The link you posted is for Unity.

davidpgil
Offline
Beigetreten: 08/26/2015

@magic banana, i did notice autoconnect seems broken. This is actually fine for me because the behavior is that it just wont connect. i just want to avoid the situation where i accidentally connect to the internet without VPN. apparently this is marked fixed in ubuntu 16.04 according to the link you shared.

Soon.to.be.Free
Offline
Beigetreten: 07/03/2016

This is just a(n educated) guess, but...

If you left-click on the internet icon in the tray, 'Edit', and then 'Add' in the new window that pops up, it gives you the option 'OpenVPN'. What happens if you select that and then click 'OK'?

davidpgil
Offline
Beigetreten: 08/26/2015

@Soon.to.be.Free , I needed to do this to setup my existing VPN connection. It shows a few tabs for configuring various things, but I cannot find any option to automatically start the VPN.

Mangy Dog

I am a member!

I am a translator!

Offline
Beigetreten: 03/15/2015

David ;-)

I'm as you with Trisquel 7 mini but Xfce, nevertheless Network Manager is identical whatever DE you are under.

You have to click on Network Manager applet, then modify your current ethernet connection settings.

Click on Network Mnager applet > Modify (etho) > In the General Settings choose : Connect Automatically to this VPN, you will be prompted with your root password, save & exit, reboot if you wish.

Triskel_7_mini_Xfce_Network_Mnager_OpenVPN.png
davidpgil
Offline
Beigetreten: 08/26/2015

Ah I see, I will try as soon as I get home! Will let you know if it works. Thanks @Mangy!

UPDATE:
Works! Apparently I can set this for wifi and for ethernet separately. Cool! Thanks again.

pyrotrisquel
Offline
Beigetreten: 06/22/2017

merci à toi pour l'explication !
Ca marche tres bien et meme si je n'ai que du wifi...
lien donné par Magic Banana

bonne journée à toi