I'm trying to setup OpenVPN using NetworkManager. The GUI seems buggy and unresponsive. Are there any other tools for setting up a VPN client?
I'm trying to setup OpenVPN using NetworkManager. The GUI seems buggy and unresponsive. Are there any other tools for setting up a VPN client?
Yes, you can use OpenVPN directly. This way you can use more settings as well.
First you need the
openvpn
package:Then you can connect like this:
The
sudo
is important because OpenVPN won't be able to connect otherwise (I think because it has to change the routes).Easiest method is running this command:
And then add a
OpenVPN
connection fromNetwork Manager
which after above command supports importing.ovpn
files.As Louis has explained installing openvpn client can be done with command
However if you are using dual authentication mechanism for your vpn server, simple connection with
will not be sufficient. You need some extra setup.
auth-user-pass
line.Next add
--auth-retry interact
to your connection command. So your entire command would look likeI'm coming here from the locked How to setup VPN using an .ovpn file? [duplicate], because I wanted to give an answer to problems of importing
*.ovpn
files in the GUI, which some users experience.Just like others, I've made sure to install:
However, on Ubuntu 18.04 (had same problem on 16.04), I've not been able to import a
*.ovpn
file using the GUI (Settings -> Network -> VPN + -> 'Import from file'). I always get:However, I just stumbled upon the following instruction from nixCraft for importing a
*.opvn
file:After running that command, my VPN connection gets listed under 'Settings -> Network -> VPN'. After editing the password, my VPN connection works. The VPN connection is also listed in top-panel menu that shows connections, power, users among other things.
Install OpenVpn
Then go to Network Settings > Edit Connection > Add > Select VPN Point to Point Tunneling Protocol > Create
Add Username, Password and Gateway
Then go to Advanced Menu
Check Use point to point Encryption
Save
Then go to Network Settings > VPN Connection and select that VPN connection and connect it.
If you don't want to involve Network Manager, this git repository has a simple script that does the whole job very well using an interactive session with less than half-a dozen questions. See docs in download.
https://github.com/Nyr/openvpn-install.git
On Ubuntu 18, install network manager with the command:
Then...
The import should work fine.