Linux

With NetworkManager (the easy way)

First install Openvpn 2.4 and the NetworkManager Openvpn module with your favorite gui tool (use this link if you use ubuntu or with these commands :

Debian : sudo apt-get install network-manager-openvpn openvpn
Ubuntu : sudo apt-get install openvpn network-manager-openvpn-gnome
Archlinux/Manjaro/Antergos : sudo pacman -S networkmanager-openvpn openvpn
Fedora : sudo dnf install NetworkManager-openvpn openvpn
OpenSuse : sudo zypper install openvpn NetworkManager-openvpn

Configure NetworkManager, example with KDE :

  • Download the config files in the control panel
  • Click on Networkmanager icon > VPN Connections > Configure VPN > import > chose the config file
  • Put private key to : "This password is not required"
  • Put your username (or password if you doesn't want it ask every time)
  • OK
  • Then, when you want to connect to the VPN click on the NetworkManager icon > VPN Connection > Click on the connection that you just created this will launch the connection process.
  • Browse the web and have fun !

With BKRCLI

Terminal (Advanced user)

  • Download the config file on the control panel
  • Run it through a terminal with this command :

sudo openvpn /path/to/the/file

If you need autologin, you can create a creds.txt file. The first line need to be your username, and the second line the password. Secure the file to root only with :

chown root:root /path/to/creds.txt
chmod 600 /path/to/creds.txt

Then add the file path to the config file after auth-user-pass :

auth-user-pass /path/to/creds.txt

Systemd Service (Advanced user)

  • Download the config file on the control panel
  • Place it in /etc/openvpn/client (file extension need to be .conf and not .ovpn)

Launch the service with : (without specifying .conf):
sudo systemctl start openvpn-client@filename.service
Activate at boot :
sudo systemctl enable openvpn-client@filename.service

Prevent leaks if VPN goes down (Advanced user)

You can download this Iptables Script, save it somewhere and run it inside a terminal as root, this will block everything except ipv4 connection to our servers.

(Don't forget to make it executable with chmod +x)

To make these rules permanent, please check the documentation of your distribution. Or add it inside the vpn config file like this (this will activate the firewall only when openvpn is started) : script-security 2 up /path/to/fw.sh down /path/to/fwstop.sh

DNS Leaks (Advanced user)

Sometime when your using OpenVPN through the terminal, DNS server are not updated in /etc/resolv.conf.
You can use theses script to force it, or just put our dns inside resolv.conf like this :
sudo echo "nameserver 185.82.101.197" > /etc/resolv.conf
and block /etc/resov.conf with sudo chattr +i /etc/resolv.conf

update-resolve script
systemd-update-resolve script

if you want to know if you are using systemd-resolve, put this in terminal :
systemctl is-active systemd-resolved >/dev/null 2>&1 && echo yes || echo no
if it's yes then you'r need to use the second script