Site Tools


en:vpn:openvpn_linux_cli
Translations of this page:

This is an old revision of the document!


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).

Connection

  • 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.

Diagnostics

The OpenVPN log is directly shown on your terminal.

en/vpn/openvpn_linux_cli.1567516973.txt.gz · Last modified: 2019-09-03 13:22 by admin