This is an old revision of the document!


WireGuard

Work-in-progress

Install

This install may replace the kernel, if so, reboot afterward.

apt update
apt full-upgrade
apt install wireguard

Setup

Log

Host 1 and Host 2
ip link add dev wg0 type wireguard
Host 1
ip address add dev wg0 192.168.44.10 peer 192.168.44.11
Host 2
ip address add dev wg0 192.168.44.11 peer 192.168.44.10

Host 1 and Host 2

cd /etc/wireguard
wg genkey | tee private-key | wg pubkey > public-key
touch wg0.conf
chmod 600 *
ls -1
private-key
public-key
wg0.conf

/etc/wireguard/wg.conf

[Interface]
ListenPort = 1234
PrivateKey = PRIVATE-KEY

[Peer]
PublicKey = PUBLIC-KEY
AllowedIPs = 0.0.0.0/0

wg setconf wg0 /etc/wireguard/wg0.conf

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies