How to accept incoming connection from specific IP Address on CentOS7/firewalld

In this case, use “rich rule” as below:

# firewall-cmd --permanent --zone=public --add-rich-rule='rule family="ipv4" source address="xxx.xxx.xxx.xxx" port port="xxxx" protocol="xxx" accept'
# firewall-cmd --reload

Leave a Reply

Your email address will not be published. Required fields are marked *