Install Wiregard VPN
On both client and server
sudo apt-add-repository universesudo apt-get updatesudo apt-get install wireguard-tools wireguardwg genkey | sudo tee /etc/wireguard/private.key
sudo chmod go= /etc/wireguard/private.keysudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.keyOn client
sudo nano /etc/wireguard/wg0.confConfig File
[Interface]
PrivateKey = <CLIENT PRIVATE KEY>
Address = <IP ADRESS THAT IS TO BE ASSIGNED TO CLIENT>
ListenPort = <ListenPort>
[Peer]
PublicKey = <Server PUBLIC KEY>
AllowedIPs = <IP ADRESS THE CLIENT IS ALLOWED TO CONNECT TO GENERALLY ALLOW WHOLE NETWORK>
Endpoint = <SERVER ENPOINT WITH PORT NUMBER>
PersistentKeepalive = <KEEP ALIVE>client public key
client private key
On Server
Server Config
server public key
server private key
References
Last updated