TorGuard Account Area

Add to Favourites    Print this Article

How to use OpenVPN from Command Line on Ubuntu/Debian/Mint

Setting up an OpenVPN client for Ubuntu/Debian/Mint, CLI edition.

1) Install the openvpn pakcage:

sudo apt install openvpn

2) Now change to the openvpn directly and download the config files:

cd /etc/openvpn


sudo wget

3) Unzip the downloaded config files:

sudo unzip

4) Move all files to /etc/openvpn/

sudo cp /etc/openvpn/iOS-Configs-UDP/* /etc/openvpn/

5) Re-name the .ovpn config files to .conf, Example: server.ovpn to server.conf, run the bellow command to rename them all to .conf.

rename -v 's/\.ovpn/\.conf/' *.ovpn

6) Run your configs like so:

openvpn server.conf

7) If you would like to save your user/pass to prevent you from entering a user/pass each time you run a config please see thie guide here

For stopping and starting the openvpn service, use the commands below:

sudo service openvpn start or stop or restart

Also Read