update install with server key

This commit is contained in:
ducoterra
2019-12-29 20:47:56 -05:00
parent 2fc67e4835
commit 6c32ffb6d2
2 changed files with 15 additions and 1 deletions

View File

@@ -8,3 +8,15 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 150\n' | sudo tee --append /etc/apt/preferences.d/limit-unstable
apt update
apt install -y wireguard qrencode
cp sysctl.conf /etc/systctl.conf
cp wg0.conf /etc/wireguard/wg0.conf
cd /etc/wireguard
umask 077
export PRIVKEY=$(wg genkey)
echo $PRIVKEY | tee privatekey | wg pubkey | tee publickey
echo $PRIVKEY | tee /etc/wireguard/wg0.conf
sysctl -p
wg-quick up wg0
wg

2
sysctl.conf Normal file
View File

@@ -0,0 +1,2 @@
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1