Hôm nay mình sẽ chia sẻ cho mọi người cách add rule firewall trên centos 7. Bao gồm mở port, chặn port, mở chặn dịch vụ, mở chăn IP, dải IP….
firewall-cmd –zone=public –list-all
firewall-cmd –permanent –zone=public –add-rich-rule=’rule family=”ipv4″ source address=”192.168.1.123/32″ protocol=”tcp” port=”7071″ accept’
firewall-cmd –permanent –zone=public –add-rich-rule=’rule family=”ipv4″ source address=”192.168.1.123” protocol=”tcp” port=”7071″ accept’
firewall-cmd –zone=public –remove-rich-rule=’rule family=”ipv4″ source address=”192.168.1.123” accept’