July 8, 2018

Quick & Easy: WireGuard

Install wireguard

Server:

save this into /etc/wireguard/wg0.conf

[Interface]
PrivateKey = output of genkey here
ListenPort = 5555
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE
Address = 192.168.2.1/24
SaveConfig = true

wg-quick up wg0

Client(s):

[Interface]
PrivateKey = output of genkey on client
Address = 192.168.2.2/24
DNS = 8.8.8.8

setup keys

Server

Client(s)

Ping:

both

DigitalOcean Referral Badge
Keep my site online & receive a $200 60-day credit at DigitalOcean for your VPS Hosting
Cheaper Games on Instant-Gaming
Creative Commons Licence