firewalld命令
1.添加x.x.x.x/24到80端口白名单:
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="x.x.x.x/24" port port="80" protocol="tcp" accept'
firewall-cmd --complete-reload
firewall-cmd --list-all
2.添加x.x.x.x/24到0-65535端口tcp白名单:
firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="x.x.x.x/24" port port="0-65535" protocol="tcp" accept'
firewall-cmd --complete-reload
firewall-cmd --list-all