From 7a176a93b77be9a09e0fb88b4e90764535041775 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 21 Sep 2014 21:17:21 +0100 Subject: [PATCH] Web ports --- install-freedombone.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install-freedombone.sh b/install-freedombone.sh index 08bf3edb..dc44c0d7 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -442,6 +442,16 @@ function save_firewall_settings { chmod +x /etc/network/if-up.d/iptables } +function configure_firewall_for_web { + if grep -Fxq "configure_firewall_for_web" $COMPLETION_FILE; then + return + fi + iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT + iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT + save_firewall_settings + echo 'configure_firewall_for_web' >> $COMPLETION_FILE +} + function configure_firewall_for_ssh { if grep -Fxq "configure_firewall_for_ssh" $COMPLETION_FILE; then return @@ -933,6 +943,7 @@ update_the_kernel enable_zram random_number_generator configure_firewall +configure_firewall_for_web configure_firewall_for_git configure_firewall_for_ssh configure_firewall_for_email