0

Everytime I use Vpn I need to connect to the VPN manually using different countries.

Is there a way to connect to the VPN automatically after the system starts on Ubuntu 18.04? Thanks.

  • Yes, it's part of the Gnome VPN Client, part of the stock Ubuntu install. Put your VPN server settings into the client and turn on the 'automatic' switch. – user535733 Jan 7 at 14:07
  • It can be done for a specific WiFi network. If you go to a new country, or a new coffee shop you may have to set it up first time. It may also depend on your VPN service provider. Different provider may have their own app that may allow what you want. – user68186 Jan 7 at 14:11
  • Can you please give me more information how can i do this ? I have set the config files from VPN provider using Settings, Network, Add Vpn but here is no option for automatically connecting to VPN. Thanks for your help. – MitKan Jan 7 at 14:20
2

To automatically connect to VPN

  • Launch nm-connection-editor or open Network Connections.
  • Choose you WiFi or LAN connection, click "Edit", select the "General" tab.
  • Enable "Automatically connect to VPN when using this connection".

Extra info on installing open VPN and use the same "settings, country" every time check this link.

  • Thanks for your help. I had enabled Automatically connect to VPN when using this connection using the nm-connection-editor, but now the problem is after i turn on the system from suspend mode i get the notification connection failed and it wont be connected to the internet automatically using wired connection or wifi.. – MitKan Jan 7 at 15:23
  • The comment is a new question and should be asked as such. Then it can be answered properly. – user68186 Jan 7 at 15:40
0

In addition to AnOn's answer you might want to have a look at this answer. If you "Store the password for all users" then the VPN will also automatically connect after waking up from being suspended.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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