From 41c6de6a4dc3b0b214c35bceceaae7b32ba24ce7 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Wed, 2 Aug 2023 09:16:11 +0100 Subject: [PATCH] Add firewall rule for MiSTer Extensions Remote (#105) --- firewall_on.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/firewall_on.sh b/firewall_on.sh index 4c5cdda..859303a 100644 --- a/firewall_on.sh +++ b/firewall_on.sh @@ -18,6 +18,7 @@ # You can download the latest version of this script from: # https://github.com/MiSTer-devel/Scripts_MiSTer +# Version 1.0.5 - 2023-08-01 - Allow connection to MiSTer Extensions Remote if present # Version 1.0.4 - 2021-08-23 - New method for checking if the script is run on a real MiSTer system (thanks to MiSTer Addons). # Version 1.0.3 - 2019-02-05 - Cosmetic changes. # Version 1.0.2 - 2019-02-03 - Remounting / as RW only when needed; downgraded version from 1.1 to 1.0.2. @@ -89,6 +90,12 @@ then IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"#-A INPUT -p tcp -m state --state NEW --dport 139 -j ACCEPT" IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"#-A INPUT -p tcp -m state --state NEW --dport 445 -j ACCEPT" fi + if [ -f "/media/fat/Scripts/remote.sh" ] + then + IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"" + IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"# Allow MiSTer Extensions Remote" + IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"-A INPUT -p tcp -m state --state NEW --dport 8182 -j ACCEPT" + fi IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"" IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"# Allow ping" IPTABLES_UP_RULES=$IPTABLES_UP_RULES$'\n'"# note that blocking other types of icmp packets is considered a bad idea by some"