diff --git a/install.sh b/install.sh index 0c1d972..66568a1 100644 --- a/install.sh +++ b/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 \ No newline at end of file +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 \ No newline at end of file diff --git a/sysctl.conf b/sysctl.conf new file mode 100644 index 0000000..8dedfbe --- /dev/null +++ b/sysctl.conf @@ -0,0 +1,2 @@ +net.ipv4.ip_forward=1 +net.ipv6.conf.all.forwarding=1 \ No newline at end of file