After placing the .path and .service files in /etc/systemd/system, Run:
-
sudo systemctl daemon-reload
-
sudo systemctl enable wg-watcher.path && sudo systemctl start wg-watcher.path
Created symlink /etc/systemd/system/multi-user.target.wants/wg-watcher.path → /etc/systemd/system/wg-watcher.path. -
sudo systemctl enable wg-watcher.service && sudo systemctl start wg-watcher.service
Created symlink /etc/systemd/system/multi-user.target.wants/wg-watcher.service → /etc/systemd/system/wg-watcher.service. -
sudo systemctl status wg-watcher.path
-
sudo systemctl status wg-watcher.service
sudo apt install wireguard
modprobe wireguard
lsmod | grep wireguard
- Set the Linux kernel to forward the traffic:
cat << EOF >> max.conf
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
EOF
sysctl -p
wg-quick up wg0
chmod 600 /etc/wireguard/wg0.conf
systemctl enable wg-quick@wg0