浏览代码

FTP ports

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

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

442
   chmod +x /etc/network/if-up.d/iptables
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
 function configure_firewall_ephemeral_ports {
454
 function configure_firewall_ephemeral_ports {
446
   if grep -Fxq "configure_firewall_ephemeral_ports" $COMPLETION_FILE; then
455
   if grep -Fxq "configure_firewall_ephemeral_ports" $COMPLETION_FILE; then
447
 	  return
456
 	  return
953
 random_number_generator
962
 random_number_generator
954
 configure_firewall
963
 configure_firewall
955
 configure_firewall_for_web
964
 configure_firewall_for_web
965
+configure_firewall_for_ftp
956
 configure_firewall_ephemeral_ports
966
 configure_firewall_ephemeral_ports
957
 configure_firewall_for_git
967
 configure_firewall_for_git
958
 configure_firewall_for_ssh
968
 configure_firewall_for_ssh