1. 程式人生 > >centos7 firewall-cmd防火牆設定

centos7 firewall-cmd防火牆設定

增加一條富規則:

firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="202.106.86.130" port port="3306" protocol="tcp" accept'

firewall-cmd --reload

刪除一條富規則:

firewall-cmd --permanent --remove-rich-rule='rule family="ipv4" source address="202.106.86.130" port port="3306" protocol="tcp" accept'

firewall-cmd --reload

檢視富規則:

firewall-cmd --list-rich-rule

檢視所有:

firewall-cmd --list-all