瀏覽代碼

Separate firewall settings for ssh

Bob Mottram 10 年之前
父節點
當前提交
78fe6ee7e8
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      install-freedombone.sh

+ 5
- 1
install-freedombone.sh 查看文件

@@ -286,8 +286,11 @@ function configure_firewall {
286 286
   ip6tables -P INPUT DROP
287 287
 }
288 288
 
289
+function configure_firewall_for_ssh {
290
+  iptables -A INPUT -i eth0 -p tcp --dport $SSH_PORT -j ACCEPT
291
+}
292
+
289 293
 function configure_firewall_for_email {
290
-  iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
291 294
   iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
292 295
   iptables -A INPUT -i eth0 -p tcp --dport 587 -j ACCEPT
293 296
   iptables -A INPUT -i eth0 -p tcp --dport 465 -j ACCEPT
@@ -717,6 +720,7 @@ set_your_domain_name
717 720
 time_synchronisation
718 721
 defend_against_port_scanning
719 722
 configure_firewall
723
+configure_firewall_for_ssh
720 724
 configure_firewall_for_email
721 725
 save_firewall_settings
722 726
 configure_internet_protocol