From d8abec70a39bec8005e10bb3064b552b9d448e00 Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Thu, 13 Jan 2022 18:00:30 -0800 Subject: [PATCH] Fixed to use INCOMING_PORT_ENV (from README.md) --- qbittorrent/iptables.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qbittorrent/iptables.sh b/qbittorrent/iptables.sh index bc0f6c2..9bdb293 100644 --- a/qbittorrent/iptables.sh +++ b/qbittorrent/iptables.sh @@ -108,10 +108,10 @@ else fi # 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 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 @@ -164,11 +164,11 @@ else fi # 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 else - echo "[info] Incoming connections port defined as ${INCOMING_PORT}" | ts '%Y-%m-%d %H:%M:%.S' - iptables -A OUTPUT -o eth0 -d "${LAN_NETWORK}" -p tcp --sport ${INCOMING_PORT} -j ACCEPT + 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_ENV} -j ACCEPT fi # accept output for icmp (ping)