Shuffle natpmp ordering
This commit is contained in:
12
services/torrents/config/98-gateway-setup
Normal file
12
services/torrents/config/98-gateway-setup
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/command/with-contenv bash
|
||||
|
||||
echo "Obtaining Wireguard Server IP..."
|
||||
wgserver=$(grep Endpoint "${CONFIG_DIR}/wireguard/wg0.conf" | 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
|
||||
Reference in New Issue
Block a user