Automatically turn on VPN on computer unlock Ubuntu 18.04Bionic: How can I automatically enable VPN on a network connection?VPN not connecting automatically in Ubuntu 18.04 LTSHow can I have my VPN connect automatically when the wireless connects?How to connect to the VPN automatically on System Startup ?vpn problem in ubuntuUbuntu 14.04.1 - Help please to setup VPNHow to automatically connect OpenConnect VPN when the connection closes?Automatically Connect to VPN when using a specific network in Ubuntu GNOME 16.04VPN connects but still no Internet on Ubuntu 14.04How to automatically connect to VPN in Ubuntu 17.10?Connecting to vPN in Ubuntu 18Ubuntu 18.04 Laptop Lid Behaviour
When can a graph be oriented to form a Hasse diagram of a finite poset?
What is this dial on my old SLR for?
Why is the logical NOT operator in C-style languages "!" and not "~~"?
Forced Conversion of Majority
What can I do to avoid potential charges for bribery?
How to not lose focus after each disruption in flow
Why is the intercept changing in a logistic regression when all predictors are standardized?
Consecutive numbers that are Manhattan distance 3 apart
Shuffling multiple iterators in order
Can you pitch an outline?
Is It normal to keep log file larger than data file?
How to temporarily replace Latin characters with Greek
Did Feynman cite a fallacy about only circles having the same width in all directions as a reason for the Challenger disaster?
Can something have more sugar per 100g than the percentage of sugar that's in it?
How to discipline overeager engineer
Finding the linear functions defining a polyhedron through integer data?
Is there any way today to recover/dump 2M disks?
What do you call the fallacy of thinking that some action A will guarantee some outcome B, when in reality B depends on multiple other conditions?
Is self-defense mutually exclusive of murder?
Is there a reason behind the 'Ending' joke?
Translation Golf XLVIII — We're sorry to see you go
Modify real part and leaves imaginary part unchanged
Does Australia produce unique 'specialty steel'?
How effective are nunchaku as a choking weapon?
Automatically turn on VPN on computer unlock Ubuntu 18.04
Bionic: How can I automatically enable VPN on a network connection?VPN not connecting automatically in Ubuntu 18.04 LTSHow can I have my VPN connect automatically when the wireless connects?How to connect to the VPN automatically on System Startup ?vpn problem in ubuntuUbuntu 14.04.1 - Help please to setup VPNHow to automatically connect OpenConnect VPN when the connection closes?Automatically Connect to VPN when using a specific network in Ubuntu GNOME 16.04VPN connects but still no Internet on Ubuntu 14.04How to automatically connect to VPN in Ubuntu 17.10?Connecting to vPN in Ubuntu 18Ubuntu 18.04 Laptop Lid Behaviour
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
When I wake the laptop from the sleep I need to get the VPN state as I left it (turned on). Can't find the setting of autoconnect in VPN settings... Need some easy way to ask the system to autoconnect the VPN when the internet is available.
Edit based on comments:
Ubuntu 18.04 has no option to Always connect to VPN when using using this connection.
vpn 18.04 openvpn
add a comment
|
When I wake the laptop from the sleep I need to get the VPN state as I left it (turned on). Can't find the setting of autoconnect in VPN settings... Need some easy way to ask the system to autoconnect the VPN when the internet is available.
Edit based on comments:
Ubuntu 18.04 has no option to Always connect to VPN when using using this connection.
vpn 18.04 openvpn
add a comment
|
When I wake the laptop from the sleep I need to get the VPN state as I left it (turned on). Can't find the setting of autoconnect in VPN settings... Need some easy way to ask the system to autoconnect the VPN when the internet is available.
Edit based on comments:
Ubuntu 18.04 has no option to Always connect to VPN when using using this connection.
vpn 18.04 openvpn
When I wake the laptop from the sleep I need to get the VPN state as I left it (turned on). Can't find the setting of autoconnect in VPN settings... Need some easy way to ask the system to autoconnect the VPN when the internet is available.
Edit based on comments:
Ubuntu 18.04 has no option to Always connect to VPN when using using this connection.
vpn 18.04 openvpn
vpn 18.04 openvpn
edited May 7 '18 at 20:40
user68186
18.2k8 gold badges53 silver badges77 bronze badges
18.2k8 gold badges53 silver badges77 bronze badges
asked May 7 '18 at 18:33
0x49D10x49D1
1801 gold badge1 silver badge7 bronze badges
1801 gold badge1 silver badge7 bronze badges
add a comment
|
add a comment
|
5 Answers
5
active
oldest
votes
If you go into your WiFi connection settings for the AP you want to connect to the VPN on, there is an Always connect to VPN when using this connection: option, which you can enable, and select the VPN which you wish to automatically connect to.
Then when you connect to this connection (or when it reconnects on wake from suspend), the system will also attempt to connect to the VPN upon successfully reconnecting to the designated WiFi AP.
It seems the changes in newer GNOME have removed this option from the main UI, so you need to run nm-connection-editor to edit the connection, which should make the option available again.
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
1
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
6
@0x49D1 Is it under the "Security" tab there maybe? If I runnm-connection-editorand edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?
– dobey
May 7 '18 at 20:56
5
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
|
show 2 more comments
It's not shown in the GUI, but you can still type
nm-connection-editor
in a terminal and select 'always connect to vpn...' under settings > general tab.
add a comment
|
An addition to @dobey answer.
I found that the icon on the password setting on the VPN connfig window
is actually clickable. It allows other system users to use vpn password,
which is required to automatically connect to vpn after suspend.

add a comment
|
The "automatically connect to this VPN" checkbox has moved. Ubuntu 18.04. Run 'nm-connection-editor' and select the wifi network that you usually connect to. Click the gear, go to General tab. It's right there at the bottom - click the checkbox, then click the dropdown below and select the VPN you want to automatically connect to.
add a comment
|
When OpenVPN is already installed on your computer and have the configurations for OpenVPN, then follow this steps:
- Unpack the configuration-zip:
unzip openvpn.zip - Move to the OpenVPN directory and rename it to “openvpn.conf.”:
sudo cp ~/Downloads/OpenVPN/'Northeast US.ovpn' /etc/openvpn/openvpn.conf
To login automatically every time you connect do this: Open “/etc/openvpn/openvpn.conf” withsudo, then search for the lineauth-user-passand addauth.txt.----> How does it looks like:auth-user-pass auth.txt! Crate the file in the following directory"/etc/openvpn”and type in there your username and password. More about that here.- Make sure OpenVPN starts up every time you turn-on your computer:
sudo
systemctl enable openvpn - Restart the computer and test your connection with services like whoer.net
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
1
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1033278%2fautomatically-turn-on-vpn-on-computer-unlock-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you go into your WiFi connection settings for the AP you want to connect to the VPN on, there is an Always connect to VPN when using this connection: option, which you can enable, and select the VPN which you wish to automatically connect to.
Then when you connect to this connection (or when it reconnects on wake from suspend), the system will also attempt to connect to the VPN upon successfully reconnecting to the designated WiFi AP.
It seems the changes in newer GNOME have removed this option from the main UI, so you need to run nm-connection-editor to edit the connection, which should make the option available again.
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
1
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
6
@0x49D1 Is it under the "Security" tab there maybe? If I runnm-connection-editorand edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?
– dobey
May 7 '18 at 20:56
5
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
|
show 2 more comments
If you go into your WiFi connection settings for the AP you want to connect to the VPN on, there is an Always connect to VPN when using this connection: option, which you can enable, and select the VPN which you wish to automatically connect to.
Then when you connect to this connection (or when it reconnects on wake from suspend), the system will also attempt to connect to the VPN upon successfully reconnecting to the designated WiFi AP.
It seems the changes in newer GNOME have removed this option from the main UI, so you need to run nm-connection-editor to edit the connection, which should make the option available again.
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
1
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
6
@0x49D1 Is it under the "Security" tab there maybe? If I runnm-connection-editorand edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?
– dobey
May 7 '18 at 20:56
5
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
|
show 2 more comments
If you go into your WiFi connection settings for the AP you want to connect to the VPN on, there is an Always connect to VPN when using this connection: option, which you can enable, and select the VPN which you wish to automatically connect to.
Then when you connect to this connection (or when it reconnects on wake from suspend), the system will also attempt to connect to the VPN upon successfully reconnecting to the designated WiFi AP.
It seems the changes in newer GNOME have removed this option from the main UI, so you need to run nm-connection-editor to edit the connection, which should make the option available again.
If you go into your WiFi connection settings for the AP you want to connect to the VPN on, there is an Always connect to VPN when using this connection: option, which you can enable, and select the VPN which you wish to automatically connect to.
Then when you connect to this connection (or when it reconnects on wake from suspend), the system will also attempt to connect to the VPN upon successfully reconnecting to the designated WiFi AP.
It seems the changes in newer GNOME have removed this option from the main UI, so you need to run nm-connection-editor to edit the connection, which should make the option available again.
edited May 8 '18 at 20:01
answered May 7 '18 at 19:39
dobeydobey
34.3k3 gold badges41 silver badges88 bronze badges
34.3k3 gold badges41 silver badges88 bronze badges
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
1
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
6
@0x49D1 Is it under the "Security" tab there maybe? If I runnm-connection-editorand edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?
– dobey
May 7 '18 at 20:56
5
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
|
show 2 more comments
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
1
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
6
@0x49D1 Is it under the "Security" tab there maybe? If I runnm-connection-editorand edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?
– dobey
May 7 '18 at 20:56
5
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
But this question is about OpenVPN as you can read in the tags
– Stackcraft_noob
May 7 '18 at 19:50
1
1
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
Ubuntu 18.04 and I have no such option here: imgur.com/a/wV48kjn
– 0x49D1
May 7 '18 at 20:17
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
@Stackcraft_noob No. The question is about how to reconnect to a VPN when the connection is restored after wake from suspend, and how to do that with how the standard way one configures a VPN in Ubuntu.
– dobey
May 7 '18 at 20:54
6
6
@0x49D1 Is it under the "Security" tab there maybe? If I run
nm-connection-editor and edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?– dobey
May 7 '18 at 20:56
@0x49D1 Is it under the "Security" tab there maybe? If I run
nm-connection-editor and edit my connection, it is under the General tab. It seems gnome-control-center has something a bit different perhaps?– dobey
May 7 '18 at 20:56
5
5
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
running the command "nm-connection-editor" did the trick, from that UI you can see the option to automatically connect to vpn and chose the reconfigured ones.
– Ajith R Nair
Jul 18 '18 at 2:24
|
show 2 more comments
It's not shown in the GUI, but you can still type
nm-connection-editor
in a terminal and select 'always connect to vpn...' under settings > general tab.
add a comment
|
It's not shown in the GUI, but you can still type
nm-connection-editor
in a terminal and select 'always connect to vpn...' under settings > general tab.
add a comment
|
It's not shown in the GUI, but you can still type
nm-connection-editor
in a terminal and select 'always connect to vpn...' under settings > general tab.
It's not shown in the GUI, but you can still type
nm-connection-editor
in a terminal and select 'always connect to vpn...' under settings > general tab.
answered Feb 5 at 0:32
user1389840user1389840
781 silver badge5 bronze badges
781 silver badge5 bronze badges
add a comment
|
add a comment
|
An addition to @dobey answer.
I found that the icon on the password setting on the VPN connfig window
is actually clickable. It allows other system users to use vpn password,
which is required to automatically connect to vpn after suspend.

add a comment
|
An addition to @dobey answer.
I found that the icon on the password setting on the VPN connfig window
is actually clickable. It allows other system users to use vpn password,
which is required to automatically connect to vpn after suspend.

add a comment
|
An addition to @dobey answer.
I found that the icon on the password setting on the VPN connfig window
is actually clickable. It allows other system users to use vpn password,
which is required to automatically connect to vpn after suspend.

An addition to @dobey answer.
I found that the icon on the password setting on the VPN connfig window
is actually clickable. It allows other system users to use vpn password,
which is required to automatically connect to vpn after suspend.

answered Dec 25 '18 at 20:35
cutalioncutalion
1133 bronze badges
1133 bronze badges
add a comment
|
add a comment
|
The "automatically connect to this VPN" checkbox has moved. Ubuntu 18.04. Run 'nm-connection-editor' and select the wifi network that you usually connect to. Click the gear, go to General tab. It's right there at the bottom - click the checkbox, then click the dropdown below and select the VPN you want to automatically connect to.
add a comment
|
The "automatically connect to this VPN" checkbox has moved. Ubuntu 18.04. Run 'nm-connection-editor' and select the wifi network that you usually connect to. Click the gear, go to General tab. It's right there at the bottom - click the checkbox, then click the dropdown below and select the VPN you want to automatically connect to.
add a comment
|
The "automatically connect to this VPN" checkbox has moved. Ubuntu 18.04. Run 'nm-connection-editor' and select the wifi network that you usually connect to. Click the gear, go to General tab. It's right there at the bottom - click the checkbox, then click the dropdown below and select the VPN you want to automatically connect to.
The "automatically connect to this VPN" checkbox has moved. Ubuntu 18.04. Run 'nm-connection-editor' and select the wifi network that you usually connect to. Click the gear, go to General tab. It's right there at the bottom - click the checkbox, then click the dropdown below and select the VPN you want to automatically connect to.
answered Apr 18 at 0:57
Some DudeSome Dude
111 bronze badge
111 bronze badge
add a comment
|
add a comment
|
When OpenVPN is already installed on your computer and have the configurations for OpenVPN, then follow this steps:
- Unpack the configuration-zip:
unzip openvpn.zip - Move to the OpenVPN directory and rename it to “openvpn.conf.”:
sudo cp ~/Downloads/OpenVPN/'Northeast US.ovpn' /etc/openvpn/openvpn.conf
To login automatically every time you connect do this: Open “/etc/openvpn/openvpn.conf” withsudo, then search for the lineauth-user-passand addauth.txt.----> How does it looks like:auth-user-pass auth.txt! Crate the file in the following directory"/etc/openvpn”and type in there your username and password. More about that here.- Make sure OpenVPN starts up every time you turn-on your computer:
sudo
systemctl enable openvpn - Restart the computer and test your connection with services like whoer.net
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
1
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
add a comment
|
When OpenVPN is already installed on your computer and have the configurations for OpenVPN, then follow this steps:
- Unpack the configuration-zip:
unzip openvpn.zip - Move to the OpenVPN directory and rename it to “openvpn.conf.”:
sudo cp ~/Downloads/OpenVPN/'Northeast US.ovpn' /etc/openvpn/openvpn.conf
To login automatically every time you connect do this: Open “/etc/openvpn/openvpn.conf” withsudo, then search for the lineauth-user-passand addauth.txt.----> How does it looks like:auth-user-pass auth.txt! Crate the file in the following directory"/etc/openvpn”and type in there your username and password. More about that here.- Make sure OpenVPN starts up every time you turn-on your computer:
sudo
systemctl enable openvpn - Restart the computer and test your connection with services like whoer.net
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
1
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
add a comment
|
When OpenVPN is already installed on your computer and have the configurations for OpenVPN, then follow this steps:
- Unpack the configuration-zip:
unzip openvpn.zip - Move to the OpenVPN directory and rename it to “openvpn.conf.”:
sudo cp ~/Downloads/OpenVPN/'Northeast US.ovpn' /etc/openvpn/openvpn.conf
To login automatically every time you connect do this: Open “/etc/openvpn/openvpn.conf” withsudo, then search for the lineauth-user-passand addauth.txt.----> How does it looks like:auth-user-pass auth.txt! Crate the file in the following directory"/etc/openvpn”and type in there your username and password. More about that here.- Make sure OpenVPN starts up every time you turn-on your computer:
sudo
systemctl enable openvpn - Restart the computer and test your connection with services like whoer.net
When OpenVPN is already installed on your computer and have the configurations for OpenVPN, then follow this steps:
- Unpack the configuration-zip:
unzip openvpn.zip - Move to the OpenVPN directory and rename it to “openvpn.conf.”:
sudo cp ~/Downloads/OpenVPN/'Northeast US.ovpn' /etc/openvpn/openvpn.conf
To login automatically every time you connect do this: Open “/etc/openvpn/openvpn.conf” withsudo, then search for the lineauth-user-passand addauth.txt.----> How does it looks like:auth-user-pass auth.txt! Crate the file in the following directory"/etc/openvpn”and type in there your username and password. More about that here.- Make sure OpenVPN starts up every time you turn-on your computer:
sudo
systemctl enable openvpn - Restart the computer and test your connection with services like whoer.net
answered May 7 '18 at 19:02
Stackcraft_noobStackcraft_noob
1807 bronze badges
1807 bronze badges
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
1
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
add a comment
|
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
1
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Before downvoting! Plz say whats wrong with the answer!
– Stackcraft_noob
May 7 '18 at 19:51
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
Thank you for the answer, I'll try to use openvpn service tomorrow. For now I've imported openvpn profile of my VPN provider, so that standard VPN interface from 18.04 works. But there is no option for autoconnect to VPN when WIFI is on imgur.com/a/wV48kjn . PS: Don't know who has downvoted, your answer seems logical to me.
– 0x49D1
May 7 '18 at 20:20
1
1
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
I downvoted because this instructs you to configure OpenVPN outside the scope of network-manager, and makes assumptions about what your VPN configuration is actually like.
– dobey
May 7 '18 at 20:58
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@dobey as I readed in the tag section the question is about OpenVPN, so I focused on that. Also the network-manager isn't the only way to do this. My answer is just a possible solution of many.
– Stackcraft_noob
May 7 '18 at 21:10
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
@Stackcraft_noob, dobey makes a good point. this is also just bad practice. you should use apt, synaptic, or some other manager to stream line the install which is always simpler. also, ubuntu uses network manager as its network service so it makes sense to make sure nm realizes it's there. vpn is really easy to set up in ubuntu and makes up for mistakes a user could make on their own.
– user383919
Aug 14 '18 at 3:42
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1033278%2fautomatically-turn-on-vpn-on-computer-unlock-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown