查询端口
firewall-cmd --query-port=10050/tcp查询端口是否开放添加:
firewall-cmd --zone=public --add-port=80/tcp --permanent (–permanent永久生效,没有此参数重启后失效)
添加端口
firewall-cmd --add-port=10050/tcp开放端口
删除端口
:
firewall-cmd --zone=public --remove-port=80/tcp --permanent
关闭防火墙
systemctl stop firewalld 关闭防火墙
查看状态:
systemctl status firewalld
禁用,禁止开机启动:
systemctl disable firewalld
启动:
systemctl start firewalld