From 833f6322144c6538101098284e54e8e8bbdc667a Mon Sep 17 00:00:00 2001 From: SachinAsus Date: Sun, 25 Feb 2024 10:33:03 +0530 Subject: [PATCH] bug fix --- wg-easy.service | 8 ++++---- wgsh/wg0-post-up.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wg-easy.service b/wg-easy.service index bcdf72fd..1eaedcd3 100644 --- a/wg-easy.service +++ b/wg-easy.service @@ -1,10 +1,10 @@ [Unit] Description=Wireguard VPN + Web-based Admin UI -After=network-online.target nss-lookup.target +After=network-online.target nss-lookup.target docker.service [Service] -Environment="WG_HOST=raspberrypi.local" # Change this to your host's public address or static public ip. -Environment="PASSWORD=REPLACEME" # When set, requires a password when logging in to the Web UI, to disable add a hashtag +#Environment="WG_HOST=raspberrypi.local" # Change this to your host's public address or static public ip. +#Environment="PASSWORD=REPLACEME" # When set, requires a password when logging in to the Web UI, to disable add a hashtag #Environment="WG_DEFAULT_ADDRESS=10.0.8.x" #Clients IP address range. #Environment="WG_DEFAULT_DNS=10.0.8.1, 1.1.1.1" #DNS server clients will use. If set to blank value, clients will not use any DNS. #Environment="WG_ALLOWED_IPS=0.0.0.0/0,::/0" #Allowed IPs clients will use. @@ -14,7 +14,7 @@ Environment="PASSWORD=REPLACEME" # When set, requires a password when logging in #Environment="WG_PERSISTENT_KEEPALIVE=25" #Value in seconds to keep the "connection" open. If this value is 0, then connections won't be kept alive. Type=simple RemainAfterExit=no -ExecStart=/usr/bin/env node /app/server.js +ExecStart=/usr/bin/env node /home/ubuntu/wg-easy/server.js Restart=on-failure RestartSec=1 diff --git a/wgsh/wg0-post-up.sh b/wgsh/wg0-post-up.sh index 60b5e9d7..81837012 100644 --- a/wgsh/wg0-post-up.sh +++ b/wgsh/wg0-post-up.sh @@ -9,14 +9,14 @@ WG_FACE="wg0" # WG NIC SUB_NET="10.250.1.0/24" # WG IPv4 sub/net aka CIDR # SUB_NET_6="" # Change this according WG_PORT="51820" # WG udp port -WG_TABLE='10' +# WG_TABLE='10' ## IPv4 ## working with single tunnel $IPT -t nat -I POSTROUTING 1 -s $SUB_NET -o $IN_FACE -j MASQUERADE $IPT -I FORWARD 1 -i $IN_FACE -o $WG_FACE -j ACCEPT #for internet $IPT -I FORWARD 1 -i $WG_FACE -o $IN_FACE -j ACCEPT #for internet $IPT -I INPUT 1 -i $IN_FACE -p udp --dport $WG_PORT -j ACCEPT # for incoming connection -$IPT -I INPUT 1 -i $IN_FACE -p tcp --dport 51821 -j ACCEPT +$IPT -I INPUT 1 -i $IN_FACE -p tcp --dport 51821 -j ACCEPT # for webui # $IPT -I INPUT 1 -i $WG_FACE -p tcp --dport 51821 -j ACCEPT wg set wg0 fwmark 51820