开放33端口
firewall-cmd --zone=public --add-port=33/tcp --permanent
指定源ip开放端口
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.2" port protocol="tcp" port="33" accept"
解决keepalived的VIP漂移问题
firewall-cmd --direct --permanent --add-rule ipv4 filter INPUT 0 --in-interface eth0 --destination 224.0.0.18 --protocol vrrp -j ACCEPT
指定源ip开放端口
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.2" port protocol="tcp" port="33" accept"
开启服务
firewall-cmd --add-service=ftp --permanent
=================================================================================================
重载使新规则生效
firewall-cmd --reload
查看
firewall-cmd --list-all