Linux系统 开通防火墙端口

Redhat 7内核 Linux系统  开通防火墙端口 使用systemctl

1.查看防火墙状态,root用户登录,执行命令systemctl status firewalld

2.开启防火墙:systemctl start firewalld

3.关闭防火墙:systemctl stop firewalld

4.放行端口:firewall-cmd --add-port=8080/tcp --permanent,此处需要注意cmd和--之间有空格

5刷新防火墙:firewall-cmd --reload ,使配置生效

猜你喜欢

转载自www.cnblogs.com/antis/p/10345898.html
今日推荐