centOS7 防火墙
作者:互联网
查看已经开放的端口:
firewall-cmd --list-ports
开启端口:
firewall-cmd --zone=public --add-port=8080/tcp --permanent
关闭端口:
firewall-cmd --permanent --zone=public --remove-port=8080/tcp
开启防火墙:
systemctl start firewalld
重启防火墙:
firewall-cmd --reload #重启
firewall systemctl stop firewalld.service #停止
firewall systemctl disable firewalld.service #禁止firewall开机启动
标签:--,cmd,防火墙,firewalld,centOS7,firewall,systemctl 来源: https://www.cnblogs.com/mrt-yyy/p/16615781.html