How To Install OpenVPN Server on Ubuntu 18
After installing Ubuntu 18
$ sudo apt update
$ sudo apt upgrade
$ wget https://git.io/vpn -O openvpn-install.sh
Setup permissions using the chmod command:
$ chmod +x openvpn-install.sh
$ vim openvpn-install.sh
To avoid problem always choose DNS as 1.1.1.1 or Google DNS. Those are fast DNS server and reached from anywhere on the Internet.
How do I start/stop/restart OpenVPN server on Ubuntu 18.04 LTS?
We need to use the systemctl command:
$ sudo systemctl stop [email protected] # <— stop server
$ sudo systemctl start [email protected] # <— start server
$ sudo systemctl restart [email protected] # <— restart server
$ sudo systemctl status [email protected] # <— get server status
Adding or removing OpenVPN client
Log in to your server and run the script again:
$ sudo ./openvpn-install.sh
OpenVPN is already installed.
Select an option:
1) Add a new client
2) Revoke an existing client
3) Remove OpenVPN
4) Exit
If not running, restart the OpenVPN server:
$ sudo systemctl start [email protected]