centos开启防火墙端口

Updated on with 0 views and 0 comments

1、查看开启的端口

firewall-cmd --list-port

2、开启一个端口

firewall-cmd --zone=public --add-port=8080/tcp --permanent

3、关闭一个端口

firewall-cmd --zone=public --remove-port=8080/tcp --permanent

4、重启防火墙

firewall-cmd --reload

5、开启、关闭防火墙

systemctl start firewalld
systemctl stop firewalld

标题:centos开启防火墙端口
作者:wenyl
地址:http://www.wenyoulong.com/articles/2020/12/22/1608599660192.html