Hi - I have a requirement to configure firewalld to allow access for specific hosts to ssh, block all other access via ssh, and allow all other access to the host on whatever port. Digging around on the internet I found a set of rich rules which appear to do what I want;
firewall-cmd --zone=public --add-rich-rule ‘rule source address=<IP> port port=“22” protocol=“tcp” accept’
firewall-cmd --zone=public --add-rich-rule ‘rule priority=“30000” port port=“22" protocol=“tcp” reject’
firewall-cmd --zone=public --add-rich-rule ‘rule priority=“32767" protocol=“tcp” accept’
firewall-cmd --zone=public --add-rich-rule ‘rule priority=“32767" protocol=“udp” accept’
the firewalld module in the forge is great - however the rich rule module does not seem to have a priority option. I was going to code some exec statements for the items requiring priority but I suspect that this will not work as the rules will not be in the puppet catalog and as a result the command which init’s firewalld with its purge rich rules will simply remove the rules applied via exec (and we end up with the rules being removed / applied in a vicious cycle).
Any suggestions ???