瀏覽代碼

Merge branch 'master' of https://github.com/bashrc/freedombone

Bob Mottram 9 年之前
父節點
當前提交
282594eb09
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      src/freedombone

+ 5
- 1
src/freedombone 查看文件

4091
 }
4091
 }
4092
 
4092
 
4093
 function configure_firewall {
4093
 function configure_firewall {
4094
+	if grep -q "RELATED" /etc/firewall.conf; then
4095
+		# recreate the firewall to remove RELATED
4096
+		sed -i "/firewall/d" $COMPLETION_FILE
4097
+	fi
4094
 	if grep -Fxq "configure_firewall" $COMPLETION_FILE; then
4098
 	if grep -Fxq "configure_firewall" $COMPLETION_FILE; then
4095
 		return
4099
 		return
4096
 	fi
4100
 	fi
4109
 	iptables -P INPUT DROP
4113
 	iptables -P INPUT DROP
4110
 	ip6tables -P INPUT DROP
4114
 	ip6tables -P INPUT DROP
4111
 	iptables -A INPUT -i lo -j ACCEPT
4115
 	iptables -A INPUT -i lo -j ACCEPT
4112
-	iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
4116
+	iptables -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
4113
 
4117
 
4114
 	# Make sure incoming tcp connections are SYN packets
4118
 	# Make sure incoming tcp connections are SYN packets
4115
 	iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
4119
 	iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP