centOS7防火墙常用命令

查看防火墙状态

[root@localhost bin]# firewall-cmd --state
running

关闭防火墙

[root@localhost bin]# systemctl stop firewalld.service
[root@localhost bin]# firewall-cmd --state
not running

打开8080端口

 iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

猜你喜欢

转载自www.cnblogs.com/zhangyating/p/9100548.html