From 78fe6ee7e8f33877c9d91246cbc3c8854e30f777 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 20 Sep 2014 21:03:55 +0100 Subject: [PATCH] Separate firewall settings for ssh --- install-freedombone.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install-freedombone.sh b/install-freedombone.sh index c209827a..e3c635d7 100644 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -286,8 +286,11 @@ function configure_firewall { ip6tables -P INPUT DROP } +function configure_firewall_for_ssh { + iptables -A INPUT -i eth0 -p tcp --dport $SSH_PORT -j ACCEPT +} + function configure_firewall_for_email { - iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT iptables -A INPUT -i eth0 -p tcp --dport 587 -j ACCEPT iptables -A INPUT -i eth0 -p tcp --dport 465 -j ACCEPT @@ -717,6 +720,7 @@ set_your_domain_name time_synchronisation defend_against_port_scanning configure_firewall +configure_firewall_for_ssh configure_firewall_for_email save_firewall_settings configure_internet_protocol