notes:setup-wireguard-vpn-on-debian9
This is an old revision of the document!
Setup a VPN Server with WireGuard on Debian 9
– Tested with Debian 9 (server side) and Ubuntu 18.04 (client side) on September 2018 –
Server Setup
Install WireGuard
Install WireGuard from Debian packages
echo "deb http://deb.debian.org/debian/ unstable main" | sudo tee /etc/apt/sources.list.d/unstable.list echo -e "Package: *\nPin: release a=unstable\nPin-Priority: 150\n" | tee /etc/apt/preferences.d/limit-unstable sudo apt update sudo apt install wireguard
Check if wireguard kernel has been loaded correctly
lsmod | grep wireguard
the output should not be blank. If necessary, you can try to load wireguard kernel module manually with
sudo modprobe wireguard
Generate Server Keys
Generate server private keys with
wg genkey
Copy and note down the generated key (should be something like SeRvErPrIvAtESeRvErPrIvAtESeRvErPrIvAte=
).
Then, generate the corresponding public key with:
echo "SeRvErPrIvAtESeRvErPrIvAtESeRvErPrIvAte=" | wg pubkey
and note down the generated public key (in our example will be SeRvErPuBlIcSeRvErPuBlIcSeRvErPuBlIcKey=
).
Now, create a
and note
notes/setup-wireguard-vpn-on-debian9.1536233488.txt.gz · Last modified: 2018/09/06 11:31 by admin