Update iptables.sh

This commit is contained in:
MarkusMcNugen 2018-04-26 02:12:32 -04:00 committed by GitHub
parent 671e6d8000
commit a0d41ecb8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ echo "[info] WebUI port defined as ${WEBUI_PORT}" | ts '%Y-%m-%d %H:%M:%.S'
DEBUG=false DEBUG=false
echo "[info] Adding ${LAN_NETWORK} as route via docker eth0" echo "[info] Adding ${LAN_NETWORK} as route via docker eth0" | ts '%Y-%m-%d %H:%M:%.S'
ip route add "${LAN_NETWORK}" via "${DEFAULT_GATEWAY}" dev eth0 ip route add "${LAN_NETWORK}" via "${DEFAULT_GATEWAY}" dev eth0
# split comma seperated string into list from LAN_NETWORKS env variable # split comma seperated string into list from LAN_NETWORKS env variable
@ -71,7 +71,7 @@ if [[ $iptable_mangle_exit_code == 0 ]]; then
# setup route for deluge webui using set-mark to route traffic for port 8080 to eth0 # setup route for deluge webui using set-mark to route traffic for port 8080 to eth0
echo "8080 webui" >> /etc/iproute2/rt_tables echo "8080 webui" >> /etc/iproute2/rt_tables
ip rule add fwmark 1 table webui ip rule add fwmark 1 table webui
ip route add default via $DEFAULT_GATEWAY table webui ip route add default via ${DEFAULT_GATEWAY} table webui
fi fi