
Status: "Initialization Sequence Completed"ĬGroup: /usr/sbin/openvpn -status /run/openvpn-server/status-server.log -status-version 2 -suppress-timestamps -config nf Loaded: loaded enabled vendor preset: enabled)Īctive: active (running) since Tue 09:01:19 UTC 4min 39s ago Sudo systemctl status - OpenVPN service for server Sudo systemctl status OR when using password to protect vpn # Sudo systemctl restart Show status of the OpenVPN server Sudo systemctl restart OR when using password to protect vpn # Sudo systemctl start Restart the OpenVPN server after changing configuration options Sudo systemctl start OR when using password to protect vpn # Sudo systemctl stop Start the OpenVPN server Sudo systemctl stop OR when using password to protect vpn # We need to use the systemctl command as follows: Stop the OpenVPN server If you want to add more clients, just run this script again! How do I start/stop/restart OpenVPN server on Ubuntu 20.04 LTS? Your client configuration is available at: /root/linuxdesktop.ovpn At the end we should see information as follows: Make sure you choose fast Geo-distributed DNS servers and reached from anywhere on the Internet. I strongly suggest that you always choose the DNS server option as 1.1.1.1 or Google DNS or any other DNS service provided that you trust as per your needs. ⚠️ You will be asked for the client password below ⚠️ It may also include an underscore or a dash.ĭo you want to protect the configuration file with a password? The name must consist of alphanumeric character. If you downloaded the second script as per step #3, you could set up a password for the client too. I am going to use the wget command as follows: Step 3 – Download and run openvpn-install.sh script All you have to do is provide a correct IP address when asked for it. The script will automatically detect your networking setup.

For example, AWS EC2/Lightsail give you this kind of NAT public IP address. Private static IP address directly attached to your server and your server is behind NAT with public IP address.For example, Linode, Digital Ocean, and others give you direct public IP address. Public static IP address directly assigned to your box and routed from the Internet.

Most cloud and bare-metal servers have two types of IP address provided by the ISP: Step 2 – Find and note down your IP addressĪlternatively we can run the following dig command/ host command to find out our public IP address from Linux command line itself:ĭig -4 +short Find IPv6 #ĭig TXT +short. | awk -F'"' ''Ī note about IP address assigned to your server


The steps are as follows: Step 1 – Update your systemįirst, run the apt command to apply security updates: Procedure: Ubuntu 20.04 LTS Set Up OpenVPN Server In 5 Minutes
