Linux centos7查看firewall状态及配置命令
查看firewall状态
systemctl status firewalld
锁定firewall
systemctl mask firewalld.service
解锁firewall
systemctl unmask firewalld.service
开启firewall
systemctl start firewalld.service
关闭firewall
systemctl stop firewalld.service
开机启动firewall
systemctl enable firewalld.service
关闭开机启动
systemctl disable firewalld.service
重载firewall
firewall-cmd --reload
移除端口
firewall-cmd --zone=public --remove-port=80/tcp --permanent
#
firewall-cmd --permanent --remove-port=123/tcp
查询已开放端口
firewall-cmd --list-port