Fixed issues with Firewalld

This commit is contained in:
TommyTran732
2020-01-03 09:01:13 -05:00
committed by GitHub
parent 5967cbc13a
commit b8ce8ba3ad
+4 -4
View File
@@ -39,14 +39,14 @@ elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" =
wget https://www.cloudflare.com/ips-v6
for ips in `cat ips-v4`;
do
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address=$ips port port="80" protocol="tcp" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address=$ips port port="443" protocol="tcp" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address='"$ips"' port port="80" protocol="tcp" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address='"$ips"' port port="443" protocol="tcp" accept'
done
for ips in `cat ips-v6`;
do
firewall-cmd --permanent --add-rich-rule='rule family="ipv6" source address=$ips port port="80" protocol="tcp" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv6" source address=$ips port port="443" protocol="tcp" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv6" source address='"$ips"' port port="80" protocol="tcp" accept'
firewall-cmd --permanent --add-rich-rule='rule family="ipv6" source address='"$ips"' port port="443" protocol="tcp" accept'
done
firewall-cmd --reload
else