1
0
Эх сурвалжийг харах

Update centos7_wireguard_install.sh

蘭雅sRGB 6 жил өмнө
parent
commit
871d2c27c8

+ 7 - 1
centos7_wireguard_install.sh

@@ -47,9 +47,15 @@ wireguard_install(){
     iptables -F  && service iptables save && service iptables restart
     echo 1 > /proc/sys/net/ipv4/ip_forward
     echo "net.ipv4.ip_forward = 1" > /etc/sysctl.conf
+
+    mkdir -p /etc/wireguard
+    cd /etc/wireguard
+    wg genkey | tee sprivatekey | wg pubkey > spublickey
+    wg genkey | tee cprivatekey | wg pubkey > cpublickey
+    chmod 777 -R /etc/wireguard
 }
 
-#Bash执行选项
+# Bash执行选项  kernel 升级内核  默认安装 wireguard
 if [[ $# > 0 ]];then
 	key="$1"
 	case $key in