The correct way to install OpenVPN Client on Linux

Berkcan Tezcaner
2 min readNov 14, 2022

--

  • In this tutorial I’ll demonstrate steps with Arch but you can easily apply all of the steps with minor adjustments for your linux distro

Install the package from the Arch repository (not recommended but you can additionally install GNOME network manager OpenVPN plugin)

# OpenVPN package
sudo pacman -Sy openvpn
# Network manage plugin
sudo pacman -Sy networkmanager-openvpn
  • Install systemd resolve updater from AUR (or alternatively build from source ..see below)
# Install sytemd resolved update package from aur
yay -S openvpn-update-systemd-resolved
  • After installation successfully finishes you will be prompted with a message like this in your terminal
  • Copy this section
script-security 2
up /usr/bin/update-systemd-resolved
up-restart
down /usr/bin/update-systemd-resolved
down-pre
  • Paste in your .ovpn configuration file like this
  • CTRL+O, CTRL+X 😉
  • Connect to your VPN using terminal
sudo openvpn --config my-vpn.ovpn
  • After you run the last command you should see Initialization Sequence Completed at the end and before that DNS information
  • Extra: Building Resolve Update from source
# Clone and build
git clone https://github.com/jonathanio/update-systemd-resolved.git;
cd update-systemd-resolved;
make;

# Start and enable systemd service
systemctl enable systemd-resolved.service;
systemctl start systemd-resolved.service;

# After installation you can delete cloned files
cd ..
rm -rf update-systemd-resolved/

Thanks for reading 🖤

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Berkcan Tezcaner
Berkcan Tezcaner

Written by Berkcan Tezcaner

berkctezc.github.io | loves💙 tech💻, programming👨‍💻, rock👨‍🎤, guitar+bass🎸, video games🎮

No responses yet

Write a response