|
@@ -1,8 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -25,7 +25,6 @@ dpkg -l|grep linux-headers
|
|
|
apt -y install qrencode
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
|
|
|
echo -e 'Package: *\nPin: release a=unstable\nPin-Priority: 150' > /etc/apt/preferences.d/limit-unstable
|
|
@@ -39,7 +38,6 @@ apt install wireguard resolvconf -y
|
|
|
|
|
|
modprobe wireguard && lsmod | grep wireguard
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
@@ -50,12 +48,10 @@ cd /etc/wireguard
|
|
|
wg genkey | tee sprivatekey | wg pubkey > spublickey
|
|
|
wg genkey | tee cprivatekey | wg pubkey > cpublickey
|
|
|
|
|
|
-
|
|
|
|
|
|
serverip=$(curl -4 icanhazip.com)
|
|
|
|
|
|
|
|
|
-
|
|
|
echo "[Interface]
|
|
|
|
|
|
PrivateKey = $(cat sprivatekey)
|
|
@@ -87,9 +83,7 @@ PublicKey = $(cat cpublickey)
|
|
|
|
|
|
AllowedIPs = 10.0.0.2/32" > wg0.conf
|
|
|
|
|
|
-
|
|
|
|
|
|
-
|
|
|
echo "[Interface]
|
|
|
|
|
|
PrivateKey = $(cat cprivatekey)
|
|
@@ -125,8 +119,6 @@ AllowedIPs = 0.0.0.0/0, ::0/0
|
|
|
|
|
|
PersistentKeepalive = 25"|sed '/^#/d;/^\s*$/d' > client.conf
|
|
|
|
|
|
-
|
|
|
-
|
|
|
|
|
|
chmod 777 -R /etc/wireguard
|
|
|
|