Merge branch 'master' of https://github.com/bashrc/freedombone
This commit is contained in:
commit
282594eb09
|
@ -4091,6 +4091,10 @@ function time_synchronisation {
|
|||
}
|
||||
|
||||
function configure_firewall {
|
||||
if grep -q "RELATED" /etc/firewall.conf; then
|
||||
# recreate the firewall to remove RELATED
|
||||
sed -i "/firewall/d" $COMPLETION_FILE
|
||||
fi
|
||||
if grep -Fxq "configure_firewall" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
|
@ -4109,7 +4113,7 @@ function configure_firewall {
|
|||
iptables -P INPUT DROP
|
||||
ip6tables -P INPUT DROP
|
||||
iptables -A INPUT -i lo -j ACCEPT
|
||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
|
||||
iptables -A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
|
||||
|
||||
# Make sure incoming tcp connections are SYN packets
|
||||
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP
|
||||
|
|
Loading…
Reference in New Issue