Site Tools

Translations of this page:

OpenVPN: Linux/*BSD/*NIX CLI generic method

This documentation is for people comfortable with command line interface.

OpenVPN installation

Install the openvpn package for your distribution, or compile from source. You need OpenVPN 2.3.4 or newer.

For Debian/Ubuntu based systems, the command is: sudo apt-get install openvpn

OpenVPN configuration

Generate and download a configuration file (My account > Services: VPN > "Generate OpenVPN configuration file" > "Generate"), and save it in your home directory (or any place you want on your computer).

DNS configuration

When using this connection method, OpenVPN will not automatically configure your computer to use the DNS servers provided by the VPN.

You need to:

  • install a script to dynamically update your DNS configuration when the VPN goes up or down,
  • or configure your computer to use public DNS resolvers (easiest way),
  • or install a local DNS resolver and configure your computer to use it (best choice if you don't reboot your computer very often).


  • Open a new terminal.
  • If you did not save the configuration file in your home directory, cd to that directory.
  • Type: sudo openvpn --config arethusa.ovpn
  • Enter your VPN username, then your VPN password (if needed).
  • Keep the terminal open.

Once connected, check your IP addresses.

Press Control-C when you want to stop the VPN.


The OpenVPN log is directly shown on your terminal.

en/vpn/openvpn_linux_cli.txt · Last modified: 2022-03-04 18:08 by admin