Setting up wireguard as a VPN

1 min read

Server setup

apt update
apt install wireguard-tools

# On the peer that will act as the "server", enable IPv4 forwarding:
sysctl -w net.ipv4.ip_forward=1

# write the server config to /etc/wireguard/wg0.conf
vim /etc/wireguard/wg0.conf
wg-quick up wg0

# To bring down the network
# wg-quick down wg0

Client set up

MacOS - install the Wireguard app, add the client config.

Making sure things are working


nc -l 8000


nc 8000


The excellent guide on ArchWiki. Specifically the section about VPN.