Install OpenVPN from the command line

Hello, I know the topic has been treated, but I did`t find a clear instructions for the Vero4k:
I am unfortunately a newbie…
I tried it that way:
sudo apt install openvpn resolvconf - ok
Download the Certificate.pem and place it in /etc/openvpn.
cd /etc/openvpn
sudo wget https://******************.pem - ok
Download this script for updating the resolver and place it in /etc/openvpn/update-resolv.conf
cd /etc/openvpn/update-resolv.conf – but there is no directory

My next step should be: sudo wget https://**********update-resolv.conf. How can I download the script to the resolver?

Next: I have to download the configuration.ovpn file: to which dir?
And I need to change it for my credentials

auth-user-pass
instead of # alternately: - my Username?
instead of# auth-user-pass ~/vpn/auth.txt - my pwd?

Or should I download the addon script.openvpn-3.0.0.zip and try it this way?
How can I download the .pem, .conf and the .ovpn file into the Vero?
Who has a good advice?
Cheers

You should look into configuring this in connman by cli.

Can you tell us the source of your instructions? It’ll help us to figure out what you’re trying to do and what’s gone wrong (or right :wink: ).

Yes of course, dillthedog:
https://riseup.net/de/vpn/vpn-red/linux#gnome

"Command Line

If you don’t want to use a graphical interface, you can run OpenVPN from the command line.

First install it:

$ sudo apt install openvpn resolvconf

Download the Riseup CA Certificate and place it in /etc/openvpn.

Download this script for updating the resolver and place it in /etc/openvpn/update-resolv.conf

Then you need to download the configuration file and you need to change it for your credentials. The auth.txt is a file with two lines, the first is your riseup.net login name, the second is a VPN Secret.

In order for openvpn to create the tun device it must be started as user root. However, it will change to the user and group you specify. For user and group options, you can replace with your username or make auth.txt and RiseupCA.pem readable by nobody. Alternately, you can leave off those options to run openvpn as root.

For more options, see man openvpn.

Then you simply need to run it like this:

$ sudo openvpn riseup.ovpn
Testing via the command line

Even if you use Network Manager to access the Riseup VPN, it can still be useful to troubleshoot problems by testing the connection via the command line. For example:

$ sudo openvpn --client --dev tun --auth-user-pass --remote vpn.riseup.net 1194 --keysize 256 --auth SHA256 --cipher AES-256-CBC --ca RiseupCA.pem

Again, see man openvpn for more options.

You can also test the Network Manager connection on the command line. For example:

#find the name of your VPN connections $ nmcli connection list | grep vpn #connect to the VPN $ nmcli connection up id "

You should download the script into a file called /etc/openvpn/update-resolv-conf. Run sudo wget -O /etc/openvpn/update-resolv-conf https://riseup.net/vpn/vpn-red/update-resolv.conf

(NB: the instructions are inconsistent with the name used in the riseup.conf file, so probably best to use update-resolv-conf , rather than update-resolv.conf. You’ll also need to make the file executable: sudo chmod +x /etc/openvpn/update-resolv-conf.)

To /etc/openvpn.

Use auth-user-pass ~/vpn/auth.txt and create the file ~/vpn/auth.txt containing your userid and password.

You can download files to your home directory using wget, then copy them across to their destination. Alternatively, use the -O option.

many, many thanks - you guys here in the forum are really great!
and thanks to Sam, who encouraged me, to ask questions despite my “technical not knowing” !
All the best - I will try it in the evening