openvpn.is
English
简体中文繁體中文EnglishРусскийفارسی

HomeDownloadLinux client

On Linux

Commands for OpenVPN on Ubuntu, Debian, Fedora and Arch, importing .ovpn with NetworkManager or the command line, and connecting at boot.

Installing OpenVPN on Linux
Installing OpenVPN on Linux No machine-readable author provided. Helohe assumed (based o, CC BY 2.5

Install

For your distribution
sudo apt install openvpn network-manager-openvpn-gnome   # Ubuntu, Debian
sudo dnf install openvpn NetworkManager-openvpn-gnome    # Fedora
sudo pacman -S openvpn networkmanager-openvpn            # Arch

Import in the desktop

In Settings open Network, press the plus next to VPN, choose import from file, and pick the .ovpn.

Command line

Connect directly
sudo openvpn --config company.ovpn
Connect at boot
sudo cp company.ovpn /etc/openvpn/client/company.conf
sudo systemctl enable --now openvpn-client@company

OpenVPN 3

There is also the official OpenVPN 3 Linux, which lets ordinary users connect without root.

Once installed
openvpn3 config-import --config company.ovpn --name company --persistent
openvpn3 session-start --config company
Names do not resolve after connecting?

DNS was not switched. Install openvpn-systemd-resolved, or import with NetworkManager.

What does kernel acceleration need?

Kernels from 6.16 include the ovpn module and 2.7 uses it by itself. Earlier ones need openvpn-dco-dkms.

Nearby gates

Signposts: OpenVPN Linux client, install OpenVPN Ubuntu, openvpn3 command