Perşembe, Ağustos 27, 2015

Centos 7 FirewallD Add/Delete/Log Rich Rule

Centos 7 has firewalld which has many options and a new language "rich language". I was looking for deleting a rich rule syntax which I found at last at fedora project wiki .
Here is a delete rich rule
 firewall-cmd --zone=public --remove-rich-rule='rule family="ipv4" source address="ip adress" reject'
 
which is added previously to the active zone=public by the following

firewall-cmd --add-rich-rule="rule family=ipv4 source address=ip_adress reject"


Here is to list all rich rules at a zone

firewall-cmd --zone=public --list-rich-rules


 If you wish to log packets you might need a rule like this
 firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="ip adress" log prefix="badboy" level="info" limit value="1/m" reject'

For further information please consult to wiki and official Redhat documentation.


Hiç yorum yok: