From b2e38b3cb4a7966e75151bda79d3cabaddd8e7f7 Mon Sep 17 00:00:00 2001 From: alexz Date: Sat, 17 Jan 2026 17:53:34 +0000 Subject: [PATCH] Derive TARGET_SUBNET dynamically from TARGET_IP Extract first 3 octets from TARGET_IP and append .0/24 --- apps/cistech-tunnel/shared/host-routing.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/cistech-tunnel/shared/host-routing.sh b/apps/cistech-tunnel/shared/host-routing.sh index 360a2a8..6016ab4 100644 --- a/apps/cistech-tunnel/shared/host-routing.sh +++ b/apps/cistech-tunnel/shared/host-routing.sh @@ -11,7 +11,7 @@ ACTION="${1:-start}" CONTAINER_IP="172.30.0.10" BRIDGE_NAME="br-cistech-vpn" TARGET_IP="${TARGET_IP:-10.3.1.0}" -TARGET_SUBNET="10.3.1.0/24" +TARGET_SUBNET="$(echo "$TARGET_IP" | cut -d. -f1-3).0/24" LAN_SUBNET="192.168.0.0/23" LAN_INTERFACES="eth0 eth1 wlan0" LOG_FILE="/var/log/cistech-routing.log"