The officially official Devuan Forum!

You are not logged in.

#1 2021-04-04 21:16:45

Micronaut
Member
Registered: 2019-07-04
Posts: 201  

Devuan and OpenVPN

In a push to finally "get some things done" that I've been wanting to do for ages, I recently created a 'private VPN' in the AWS cloud using OpenVPN according to this tutorial. I did get it working, and it's now usable with my Windows desktop system. The directions explain how to install the Windows version of the OpenVPN client, but not the Linux version. Since I also recently converted a laptop from Windows to Linux (per my post in the Installation forum), I'd like to get that also able to use this personal VPN. Installing OpenVPN, Network-Manager-OpenVPN, and Network-Manager-OpenVPN-Gnome as the Debian Wiki suggests, I can't find anything to configure. There is a blank directly in /etc now, and no hint how to proceed. Can someone tell me how you configure the OpenVPN client in a Devuan Beowulf install running Cinnamon?

Offline

#2 2021-04-04 23:18:39

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: Devuan and OpenVPN

afaik you only need the openvpn package; the rest is just some GUI confusion overlay trying to make sure you don't know and understand what you are doing.

Then you need to generate a client key at the server end, and copy the client part to the client end.

And then you need the client configuration file to match up with the service. It's all well documented in man openvpn.

Offline

#3 2021-04-05 00:19:19

Micronaut
Member
Registered: 2019-07-04
Posts: 201  

Re: Devuan and OpenVPN

But sometimes the GUI helps you figure out what is going on when you don't understand what you are doing. The wiki only tells you how to run it manually, and suggests you use the GUI without explaining how to do that. Presumably, most of us want to run a VPN without having to have an open terminal on the taskbar all the time, so you would think they would be more verbose explaining about the Network Manager route.

Anyway,  I finally realized that Network Manager creates a VPN connection like any other, by 'adding' with the "+" button. There isn't an obvious 'VPN' addition to the main window, only further down in the menus. The names in the GUI don't fully correspond to the names in the  text config, so I had to guess about some things. But even after finishing an OpenVPN connection and clicking 'save' there still isn't a config file in the openvpn directory, so I still don't know where the data is and cannot yet fix any mistakes directly. So the GUI wasn't much help this time. sad Since I'm getting tired and annoyed today, I guess I'll have to work on it some more tomorrow.

Offline

#4 2021-04-05 19:19:12

Micronaut
Member
Registered: 2019-07-04
Posts: 201  

Re: Devuan and OpenVPN

OK, I can get the OpenVPN client to connect with "openvpn --config [filename]" where [filename] is the Windows config file with a little bit of editing to change the client key name. Gotta have different keys for different clients. smile It works, but I'm stuck with an open terminal window while it's running. How can I transfer the settings in the config file to a Network Manager profile that will just add a line in the Network Connections panel?

Offline

#5 2021-06-08 04:11:44

tylerdurden
Member
From: /home
Registered: 2018-07-16
Posts: 39  

Re: Devuan and OpenVPN

Micronaut wrote:

OK, I can get the OpenVPN client to connect with "openvpn --config [filename]" where [filename] is the Windows config file with a little bit of editing to change the client key name. Gotta have different keys for different clients. smile It works, but I'm stuck with an open terminal window while it's running. How can I transfer the settings in the config file to a Network Manager profile that will just add a line in the Network Connections panel?

I stopped using NetworkManager long ago but if you have

network-manager-openvpn-gnome

installed and the NetworkManager service is enabled and up and running then you should be able to just import an existing *.ovpn file using the menus provided by NM's graphical user interface.

That said, these days I just use a Perl script I wrote to select which server I want to connect to and run that in a terminal. Once it's connected, I generally just keep that terminal open. However, you *can* close the terminal just fine since the openvpn process will keep running in the background.

Let's say you hibernate or suspend your machine with the openvpn process still running. Once you resume your session, the process will still be there and it'll reconnect automatically. If you closed the terminal from which you started the process, no worries.

You can always check the connection by running something along these lines:

sudo watch 'lsof -i | grep openvpn'

I do this all the time these days and it works fine.

Hope this helps.

Offline

Board footer