Centos7 Firewalld 解决防火墙问题
2021/4/13 7:28:13
本文主要是介绍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命令关闭吧。
这篇关于Centos7 Firewalld 解决防火墙问题的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-07-05feign默认connecttimeout和readtimeout是多少-icode9专业技术文章分享
- 2024-07-05idea控制台,日志太多,导致部分想看得日志被刷走 搜不到-icode9专业技术文章分享
- 2024-07-05The server selected protocol version Tls10 is not accepted by client preferences [TLs12]-icode9专业技术文章分享
- 2024-07-05怎么清理项目缓存-icode9专业技术文章分享
- 2024-07-04安装 Eyoucms详细图文教程-icode9专业技术文章分享
- 2024-07-04ueditor 复制文章时,图片的链接是一个下载图片地址,该如何处理?-icode9专业技术文章分享
- 2024-07-04怎样判断host有没有对wordpress有缓存呢-icode9专业技术文章分享
- 2024-07-04具有编译功能的系统make后,无法ssh连接-icode9专业技术文章分享
- 2024-07-04make后如何升级ssh-icode9专业技术文章分享
- 2024-07-03微信支付提示下单账户与支付账户不一致-icode9专业技术文章分享