Reintroduce VPN_LAN_NETWORK

This commit is contained in:
Colin Hebert
2023-04-11 08:16:29 +10:00
parent 968978e77b
commit 1c05047837
3 changed files with 11 additions and 1 deletions

View File

@@ -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

View File

@@ -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