查看防火墙状态
[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
查看防火墙状态
[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