From 3554bdd2c4e31c38040381436175318ab32b641f Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 14 Oct 2014 13:02:48 +0800 Subject: [PATCH] fix firewall block of calibre companion on Kindle --- platform/kindle/koreader.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/kindle/koreader.sh b/platform/kindle/koreader.sh index bd3e7b1d9..7ad2bce0a 100755 --- a/platform/kindle/koreader.sh +++ b/platform/kindle/koreader.sh @@ -114,10 +114,12 @@ export TESSDATA_PREFIX="data" # export dict directory export STARDICT_DATA_DIR="data/dict" -# accept input ports for zsync plugin logmsg "Setting up IPTables rules . . ." +# accept input ports for zsync plugin iptables -A INPUT -i wlan0 -p udp --dport 5670 -j ACCEPT iptables -A INPUT -i wlan0 -p tcp --dport 49152:49162 -j ACCEPT +# accept input ports for calibre companion +iptables -A INPUT -i wlan0 -p udp --dport 8134 -j ACCEPT # bind-mount system fonts if ! grep ${KOREADER_DIR}/fonts/host /proc/mounts > /dev/null 2>&1 ; then @@ -251,8 +253,9 @@ if [ "${STOP_FRAMEWORK}" == "no" -a "${INIT_TYPE}" == "upstart" ] ; then fi fi -# restore firewall rules logmsg "Restoring IPTables rules . . ." +# restore firewall rules +iptables -D INPUT -i wlan0 -p udp --dport 8134 -j ACCEPT iptables -D INPUT -i wlan0 -p udp --dport 5670 -j ACCEPT iptables -D INPUT -i wlan0 -p tcp --dport 49152:49162 -j ACCEPT