Install Wiregard VPN
Wiregard does not follow tradition client server architecture its more of a peer architecture
wiregard ip address on server has to be different and unique on the network
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
https://www.digitalocean.com/community/tutorials/how-to-create-a-point-to-point-vpn-with-wireguard-on-ubuntu-16-04
Look into this for S2S
https://ubuntu.com/server/docs/wireguard-vpn-site-to-site
Last updated