firewall常用命令:
//启动防火墙
systemctl start firewalld
//关闭防火墙
systemctl stop firewalld
//查看防火墙状态
systemctl status firewalld
//开机禁用
systemctl disable firewalld
//开机启用
systemctl enable firewalld
//添加端口(--permanent永久生效,没有此参数重启后失效)
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --permanent --zone=public --add-port=100-500/tcp
//重新载入
firewall-cmd --reload
//查看
firewall-cmd --zone= public --query-port=80/tcp
//删除
firewall-cmd --zone=public --remove-port=80/tcp --permanent