From 1c050478375f35c01636fb8f501c7e67723e3171 Mon Sep 17 00:00:00 2001 From: Colin Hebert Date: Tue, 11 Apr 2023 08:16:29 +1000 Subject: [PATCH] Reintroduce VPN_LAN_NETWORK --- services/torrents/config/97-gateway-setup | 8 +++++++- services/torrents/config/98-natpmp-install | 3 +++ services/torrents/docker-compose.yml | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/services/torrents/config/97-gateway-setup b/services/torrents/config/97-gateway-setup index e236daa..1b47933 100644 --- a/services/torrents/config/97-gateway-setup +++ b/services/torrents/config/97-gateway-setup @@ -1,6 +1,12 @@ #!/command/with-contenv bash +echo "Obtaining Wireguard Server IP..." wgserver=$(grep Endpoint "${CONFIG_DIR}/wireguard/wg0.conf" | awk '{print $3}') -gateway=$(ip -o -4 route show to default | awk '{print $3}') +echo "IP: ${wgserver%:*}" +echo "Obtaining default gateway..." +gateway=$(ip -o -4 route show to default | awk '{print $3}') +echo "Gateway: ${gateway}" + +echo "Adding route to Wireguard Server via Default Gateway" ip -4 route add ${wgserver%:*} via ${gateway} dev eth0 diff --git a/services/torrents/config/98-natpmp-install b/services/torrents/config/98-natpmp-install index ec657e5..85c7da9 100644 --- a/services/torrents/config/98-natpmp-install +++ b/services/torrents/config/98-natpmp-install @@ -1,4 +1,7 @@ #!/command/with-contenv bash +echo "Installing Git..." apk add -u git + +echo "Installing py-natpmp" git clone https://github.com/yimingliu/py-natpmp.git diff --git a/services/torrents/docker-compose.yml b/services/torrents/docker-compose.yml index ffa9024..3e9d3f4 100644 --- a/services/torrents/docker-compose.yml +++ b/services/torrents/docker-compose.yml @@ -8,6 +8,7 @@ services: PUID: ${NASCOMPOSE_UID?} PGID: ${NASCOMPOSE_GID?} VPN_ENABLED: true + VPN_LAN_NETWORK: 192.168.0.0/23 cap_add: - NET_ADMIN sysctls: