Fixed to use INCOMING_PORT_ENV (from README.md)

This commit is contained in:
Andrei Zmievski 2022-01-13 18:00:30 -08:00
parent 2dbbbc6006
commit d8abec70a3

View File

@ -108,10 +108,10 @@ else
fi fi
# accept input to qbittorrent daemon port - used for lan access # accept input to qbittorrent daemon port - used for lan access
if [ -z "${INCOMING_PORT}" ]; then if [ -z "${INCOMING_PORT_ENV}" ]; then
iptables -A INPUT -i eth0 -s "${LAN_NETWORK}" -p tcp --dport 8999 -j ACCEPT iptables -A INPUT -i eth0 -s "${LAN_NETWORK}" -p tcp --dport 8999 -j ACCEPT
else else
iptables -A INPUT -i eth0 -s "${LAN_NETWORK}" -p tcp --dport ${INCOMING_PORT} -j ACCEPT iptables -A INPUT -i eth0 -s "${LAN_NETWORK}" -p tcp --dport ${INCOMING_PORT_ENV} -j ACCEPT
fi fi
@ -164,11 +164,11 @@ else
fi fi
# accept output to qBittorrent daemon port - used for lan access # accept output to qBittorrent daemon port - used for lan access
if [ -z "${INCOMING_PORT}" ]; then if [ -z "${INCOMING_PORT_ENV}" ]; then
iptables -A OUTPUT -o eth0 -d "${LAN_NETWORK}" -p tcp --sport 8999 -j ACCEPT iptables -A OUTPUT -o eth0 -d "${LAN_NETWORK}" -p tcp --sport 8999 -j ACCEPT
else else
echo "[info] Incoming connections port defined as ${INCOMING_PORT}" | ts '%Y-%m-%d %H:%M:%.S' echo "[info] Incoming connections port defined as ${INCOMING_PORT_ENV}" | ts '%Y-%m-%d %H:%M:%.S'
iptables -A OUTPUT -o eth0 -d "${LAN_NETWORK}" -p tcp --sport ${INCOMING_PORT} -j ACCEPT iptables -A OUTPUT -o eth0 -d "${LAN_NETWORK}" -p tcp --sport ${INCOMING_PORT_ENV} -j ACCEPT
fi fi
# accept output for icmp (ping) # accept output for icmp (ping)