查看防火墙状态:
systemctl status firewalld
启动防火墙:
systemctl start firewalld
关闭防火墙:
systemctl stop firewalld
禁用防火墙:
systemctl disable firewalld
重启防火墙(修改配置后要重启防火墙):
firewall-cmd --reload
开放指定端口:
firewall-cmd --permanent --add-port=80/tcp
移除开放的端口:
firewall-cmd --permanent --remove-port=80/tcp
查看开放了哪些端口:
firewall-cmd --list-ports
标签:--,cmd,防火墙,firewalld,命令,systemctl,linux,firewall
From: https://www.cnblogs.com/mmcode/p/17472634.html