Fixed issues with Firewalld
This commit is contained in:
+4
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user