第一次使用Firewalld关了半天没关掉,之前一直使用iptables,从来没出现过这么挠头的问题。
记录一下我解决端口不能访问的问题,其实思路很简单,卸载Firewalld安装iptables
一步一步来说吧
1. Disable Firewalld Service.

[root@rhel-centos7-tejas-barot-linux ~]# systemctl mask firewalld

2. Stop Firewalld Service.

[root@rhel-centos7-tejas-barot-linux ~]# systemctl stop firewalld

3. Install iptables service related packages.

[root@rhel-centos7-tejas-barot-linux ~]# yum -y install iptables-services

4. Make sure service starts at boot:

[root@rhel-centos7-tejas-barot-linux ~]# systemctl enable iptables

[root@rhel-centos7-tejas-barot-linux ~]# systemctl enable ip6tables

5. Now, Finally Let’s start the iptables services.

[root@rhel-centos7-tejas-barot-linux ~]# systemctl start iptables

[root@rhel-centos7-tejas-barot-linux ~]# systemctl start ip6tables

安装iptables 已经完成了这个时候iptables已经能用了。
但是您的Firewalld 还在runing。不信您可以查看一下
firewall-cmd –state
好了不废话了,直接yum remove firewalld
终于卸载了………………………..
好了你可以使用iptables了,尽情使用吧。
如果您连iptables也不想用了那就使用
service iptables stop命令关闭吧。

https://blog.csdn.net/hugengyong/article/details/50619902