Skip to content

Instantly share code, notes, and snippets.

@larsmartens
larsmartens / install-wireguard-server.sh
Created May 19, 2022 19:42 — forked from jph00/install-wireguard-server.sh
Installation of Wireguard server. Tested on Ubuntu 20.04. Should work on 18.04 as well.
#!/usr/bin/env bash
set -e
echo
if ! [[ $(id -u) = 0 ]]; then
echo "Please run 'sudo ./install-wireguard.sh'" >&2
exit 1
fi
read -e -p "Use VPN for *all* internet traffic? [y/n] " -i n ROUTE_ALL