Table of Content
For Windows users
- Download and install OpenVPN from https://openvpn.net/index.php/open-source/downloads.html for Window: choose installer openvpn-install*.exe.
- Prepare OpenVpn config file (*.ovpn) e.g. openvpn-rangsiman.ovpn.
- Copy file from (2) to **C:\Program Files\OpenVPN\config** (or where you installed OpenVPN) or click at OpenVPN icon at taskbar. Then select Import file… and navigate to openvpn config file.
- Open OpenVPN by double click its icon on desktop or search on Start Menu –> OpenVPN GUI.
- Activate OpenVPN by selecting Connect to connect access Linux server.
- Enter your username and password.
- Wait until connection completed. Notice that the icon of OpenVPN at taskbar would be changed color from white to orange and to green, respectively.
- Connection done
- Caveat: you should disconnect OpenVPN when you have finished SSH.
For non-Windows users
- Open terminal.
- Install OpenVPN using command sudo apt-get install openvpn for Ubuntu or Debian-based Linux distribution and sudo yum install openvpn for Fedora or CentOS Linux distribution.
- Prepare your config file (*.ovpn) e.g. openvpn-rangsiman.ovpn and save it at your home directory:
/home/rangsiman/vpn/
- Create passwd authentication file e.g. passwd.txt. Then put your username and passwd to this file.
- Connect VPN using command
sudo openvpn --config /home/rangsiman/vpn/openvpn-rangsiman.ovpn --auth-user-pass /home/rangsiman/vpn/passwd.txt --auth-nocache
- Enter your sudo password.
- Wait until you see status message “Initialization Sequence Completed”.
- Now you are ready to connect access Linux server.
You can watch this video for step-by-step using OpenVPN on Linux.
Error and Solution
If you face an error like this
Fri May 25 13:54:07 2018 failed to find GID for group nogroup
Fri May 25 13:54:07 2018 Exiting due to fatal error
This can be solve by change the group name in OpenVPN configuration file. For example,
user nobody
group nogroup
change to
user nobody
group nobody