浏览代码

FTP ports

Bob Mottram 10 年前
父节点
当前提交
7844d18b5e
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
    0
      install-freedombone.sh

+ 10
- 0
install-freedombone.sh 查看文件

@@ -442,6 +442,15 @@ function save_firewall_settings {
442 442
   chmod +x /etc/network/if-up.d/iptables
443 443
 }
444 444
 
445
+function configure_firewall_for_ftp {
446
+  if grep -Fxq "configure_firewall_for_ftp" $COMPLETION_FILE; then
447
+	  return
448
+  fi
449
+  iptables -I INPUT -i eth0 -p tcp --dport 20:21 -j ACCEPT
450
+  save_firewall_settings
451
+  echo 'configure_firewall_for_ftp' >> $COMPLETION_FILE
452
+}
453
+
445 454
 function configure_firewall_ephemeral_ports {
446 455
   if grep -Fxq "configure_firewall_ephemeral_ports" $COMPLETION_FILE; then
447 456
 	  return
@@ -953,6 +962,7 @@ enable_zram
953 962
 random_number_generator
954 963
 configure_firewall
955 964
 configure_firewall_for_web
965
+configure_firewall_for_ftp
956 966
 configure_firewall_ephemeral_ports
957 967
 configure_firewall_for_git
958 968
 configure_firewall_for_ssh