Make router IP address configurable via deploy.conf

Add GATEWAY_IP, GATEWAY_PREFIX, GATEWAY_NETWORK, DHCP_RANGE_START, and
DHCP_RANGE_END variables to deploy.conf. Update ap/21-van-br0.network,
ap/van-ap-dnsmasq.conf, and ap/nftables.conf to use @TOKEN@ placeholders
for IP configuration instead of hardcoding 10.42.x addresses.

This allows deploying the same configuration to multiple routers on
different networks (e.g., Pi 5 on 10.42.0.x and R5C on 10.42.1.x) by
simply editing deploy.conf before running ./deploy.sh.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-18 17:31:18 -04:00
co-authored by Claude Haiku 4.5
parent ec5130ea7d
commit ad199fb0b0
5 changed files with 44 additions and 23 deletions
+17 -4
View File
@@ -10,20 +10,23 @@
# `ip -br link` (wired). USB vendor ID: `lsusb`.
# Preview a rendered file without deploying: `sudo ./deploy.sh render <file>`
SKIP_COCKPIT=1
# 5GHz AP radio (currently: Realtek RTL8852BU, driver rtw89_8852bu)
WIFI_5G_IFACE=wlxc83a35a4ee55
#WIFI_5G_IFACE=wlxc83a35a4ee55
WIFI_5G_IFACE=wlan1
# 2.4GHz AP radio (currently: D-Link DWA-171, RTL8821CU, driver rtw88_8821cu)
#WIFI_2G_IFACE=wlx3c3332002066
WIFI_2G_IFACE=wlxf4f26d1760a7
WIFI_2G_IFACE=wlan2
# Wired LAN port, USB-attached gigabit adapter (RTL8153-family)
LAN_USB_IFACE=enx00e04c331140
LAN_USB_IFACE=eth0
# Starlink dish uplink, USB-attached gigabit adapter (RTL8153-family)
#STARLINK_IFACE=enxd8ec5eeb3512 # White Belkin dongle
#STARLINK_IFACE=enx6c1ff7d210a5 # UGreen 8-port hub's built-in Ethernet (ASIX AX88179B)
STARLINK_IFACE=enx3c8cf861752b # TrendNet USB dongle
STARLINK_IFACE=eth1
# Cellular modem USB vendor ID (Quectel EC25-AF)
MODEM_USB_VENDOR=2c7c
@@ -33,3 +36,13 @@ MODEM_USB_VENDOR=2c7c
# entirely; see ap/van-wan-dns.conf + ap/99-van-router-dns.conf). Keeps
# resolution identical on Wapana, Starlink, or cellular.
DNS_RESOLVERS="1.1.1.1 8.8.8.8"
# IP address configuration for this router
# When deploying to different hardware, change GATEWAY_IP, DHCP_RANGE_START/END, and GATEWAY_NETWORK.
# Pi 5 (main): 10.42.0.1/24 with DHCP 10.42.0.10-254
# R5C (failover): 10.42.1.1/24 with DHCP 10.42.1.10-254
GATEWAY_IP="10.42.1.1"
GATEWAY_PREFIX="24"
GATEWAY_NETWORK="10.42.1.0/24"
DHCP_RANGE_START="10.42.1.10"
DHCP_RANGE_END="10.42.1.254"