

PrivateKey = uJPzgCQ6WNlAUp3s5rabE/EVt1qYh3Ym01s圆oJI0V4= # Note down the privatekey }# cat privatekeyĮdit the /etc/wireguard/wg0.conf file on your client }$ sudo nano /etc/wireguard/wg0.conf Next we need create VPN client config on Ubuntu/Debian/CentOS Linux }$ sudo sh -c 'umask 077 touch }$ sudo }# cd }# umask 077 wg genkey | tee privatekey | wg pubkey > }# ls -l publickey privatekey
Pritunl default route install#
Let us install the client on an Ubuntu Linux 20.04 LTS }$ sudo apt install wireguard The procedure for installing and configuring a VPN client is the same as setting up the server. Step 6 – Wireguard VPN client configuration ↑ Turn the WireGuard service at boot time using the systemctl command, }$ sudo systemctl enable the service, }$ sudo systemctl start the service status, }$ sudo systemctl status that interface named wg0 is up and running on Ubuntu server using the ip }$ sudo }$ sudo ip a show wg0 Step 5 – Enable and start WireGuard service ↑

Pritunl default route how to#
See “ How To Configure Firewall with UFW on Ubuntu 20.04 LTS” for more info. I am assuming that you have UFW configured and we are going to open UDP 41194 port using the ufw command as }$ sudo ufw allow 41194/udp Step 4 – Set up UFW firewall rules to open required ports ↑ Save and close the file when using vim text editor. PrivateKey = eEvqkSJVw/7cGUEcJXmeHiNFDLBGOz8GpScshecvNHU=

# Set Up WireGuard VPN on Ubuntu By Editing/Creating wg0.conf File #
Pritunl default route update#
Set Up WireGuard VPN on Ubuntu by Editing wg0.confĮdit or update the /etc/wireguard/wg0.conf file as }$ sudo nano /etc/wireguard/wg0.conf # Please note down the private key }# cat publickey To view keys created use the cat command and ls }# ls -l privatekey }# cat privatekey # Make a new wireguard dir if not found using mkdir command }# mkdir -m 0700 }# cd /etc/wireguard/Įxecute the following }# umask 077 wg genkey | tee privatekey | wg pubkey > publickey Let us cd into /etc/wireguard using the cd command }$ sudo -i }$ sudo apt install wireguardįirst we need to create a private and public key pair for the WireGuard server. It is time for setting up a WireGuard VPN server on Ubuntu 20.04 server. Now we got our server updates with the latest security patches. Run the apt command to install Ubuntu 20.04 security }$ sudo apt }$ sudo apt upgrade Step 2 – Installing a WireGuard VPN server on Ubuntu 20.04 LTS ↑ In other words, you need to copy and paste command after my shell prompt. Please note that }$ OR }$ is my shell prompt and is not part of actual commands. The steps are as follows for installing and configuring WireGuard on Ubuntu Linux 20.04 LTS as a VPN server. Our sample setup includes a simple peer connection between a cloud server running Ubuntu 20.04 LTS server, and a Ubuntu/Ubuntu/RHEL/SUSE/OpenSUSECentOS Linux desktop client: Procedure: Ubuntu 20.04 set up WireGuard VPN server ↑
