1

Following the Arch Wiki's guide to ProtonVPN, I have several .ovpn files inside /etc/openvpn/client. Every time I want to connect to a certain server, I need to fully type the command:

sudo openvpn /etc/openvpn/client/file.ovpn

Given that my shell autocompletion does not work for file name for some reason, what would be the recommended way to simplify how I connect to a server? I'm sure there must be some application that manages what's inside the client folder for the user so a simple command suffices, but for some reason I couldn't find one.

I could always use an alias in my shell configuration for the most common servers I connect to, but it seems counterintuitive to work in this way.

Obs: I could use the protonvpn package itself instead, but I can't seem to make it work out of the box on my machine, so I'm disregarding it here.

1 Answer 1

1

There are a couple of possibilities that I can think of:

The shell method

Other than using aliases, a quick and dirty way is to make a shell script that does the boring stuff for you:

#!/bin/sh
sudo openvpn /etc/openvpn/client/$1.ovpn

You probably don't have billions of configuration scripts, so this should work fine.

The NetworkManager method

If you're using NetworkManager, you can install the networkmanager-openvpn package and use nmcli to import the connection's .ovpn file, as described in the Arch wiki:

nmcli connection import type openvpn file <file.ovpn>

There is a nice graphical interface in Gnome and KDE for the NetworkManager OpenVPN client too, if that's important. :-)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .