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

 

posted @ 2018-05-28 15:49  一个tester的独白  阅读(131)  评论(0编辑  收藏  举报