Centos7 Firewalld 解决防火墙问题

**

Centos7 Firewalld 解决防火墙问题

**
第一次使用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命令关闭吧。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值