The officially official Devuan Forum!

You are not logged in.

#1 2020-07-24 18:14:29

Vernon
Member
Registered: 2020-07-19
Posts: 42  

HOWOTO: Beowulf Connect to your VPN provider with openvpn

August 1, 2020
Updated with instructions for freevpn.me, a free, no-signup vpn provider that allows all traffic.

Many VPN providers have support for openvpn. VPN providers 'usually have a separate .ovpn file for each individual server. Some frequently change their keys, passwords and certificates. As a result, it is easier to invoke openvpn from the command line rather than loading and unloading .ovpn configurations into a network manager.

Install openvpn and resolvconf packages

Become root using the following command.

su -

Note the dash at the end of the su command. This is required because we will be running tools from the sbin directories.

Install openvpn and resolvconf packages using the following command.

apt-get install openvpn resolvconf

Since we want to invoke openvpn from the command line, we don't want openvpn running a daemon. To accomplish this, issue the following commands.

/etc/init.d/openvpn stop
update-rc.d openvpn disable
Download and extract the VPN bundle from freevpn.me
wget https://freevpnme.b-cdn.net/FreeVPN.me-OpenVPN-Bundle-July-2020.zip
unzip FreeVPN.me-OpenVPN-Bundle-July-2020.zip
Modify freevpn.me .ovpn files to prevent DNS leakage
cd FreeVPN.me-OpenVPN-Bundle-July-2020/FreeVPN.me\ -\ Server1-NL

Add the following lines to each .ovpn file to prevent DNS leakage.

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

Instead of adding manually, you can use the following script below.

#!/bin/bash

for i in *.ovpn
do
sed -i "/auth-user-pass/a script-security 2\\
up /etc/openvpn/update-resolv-conf\\
down /etc/openvpn/update-resolv-conf" $i
done
Run openvpn

For example, If you want to connect to the freevpn.me VPN server over TCP at port 443, invoke openvpn as root with the following command.

openvpn Server1-TCP443.ovpn

Enter the username and password when prompted from the freevpn.me web site here

To stop openvpn, press the Ctrl+c keys simultaneously.

Test your VPN connection

Go to https://www.dnsleaktest.com/

Make sure that this web page is reporting your VPN provider's IP address and not your Internet Service Provider's IP address.

Click on Standard Test
.
Make sure that the IP addresses reported are from your VPN provider and not from your Internet Service Provider'.

Corrections and Comments are welcome.

Last edited by Vernon (2020-08-02 02:55:55)

Offline

Board footer