update install with server key
This commit is contained in:
14
install.sh
14
install.sh
@@ -7,4 +7,16 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010
|
||||
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
|
||||
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
2
sysctl.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
net.ipv4.ip_forward=1
|
||||
net.ipv6.conf.all.forwarding=1
|
||||
Reference in New Issue
Block a user