1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| sudo apt install firewalld
systemctl start firewalld.service
systemctl stop firewalld.service
systemctl restart firewalld.service
systemctl status firewalld.service
systemctl enable firewalld
firewall-cmd --zone=public --list-ports
firewall-cmd --reload
firewall-cmd --reload
firewall-cmd --zone=public --add-port=41601/tcp --permanent
firewall-cmd --zone=public --remove-port=41602/tcp --permanent
firewall-cmd --permanent --add-port=9001-9100/tcp
firewall-cmd --permanent --add-rich-rule='rule protocol value="icmp" drop'
firewall-cmd --permanent --remove-rich-rule='rule protocol value="icmp" drop'
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" protocol value="icmp" source NOT address="192.168.2.10" drop'
firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" protocol value="icmp" source NOT address="192.168.2.10" drop'
|