博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS7 关闭防火墙
阅读量:3641 次
发布时间:2019-05-21

本文共 877 字,大约阅读时间需要 2 分钟。

CentOS6关闭防火墙使用以下命令,

//临时关闭

service iptables stop
//禁止开机启动
chkconfig iptables off
CentOS7中若使用同样的命令会报错,

stop  iptables.service

Failed to stop iptables.service: Unit iptables.service not loaded.

 

 

这是因为CentOS7版本后防火墙默认使用firewalld,因此在CentOS7中关闭防火墙使用以下命令,

//临时关闭

systemctl stop firewalld
//禁止开机启动
systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

 

 

 

 

当然,如果安装了iptables-service,也可以使用下面的命令,

yum install -y iptables-services

//关闭防火墙
service iptables stop
Redirecting to /bin/systemctl stop  iptables.service
//检查防火墙状态
service iptables status
Redirecting to /bin/systemctl status  iptables.service
鈼iptables.service - IPv4 firewall with iptables
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
 

转载地址:http://lpfyn.baihongyu.com/

你可能感兴趣的文章
【Unity】删除所有子物体保留父物体的2种方式
查看>>
基本组件操作
查看>>
Time模块
查看>>
InputModule
查看>>
Unity3D Waypoint (路点)
查看>>
同步延时问题解决方案
查看>>
面试题总结
查看>>
简易小地图制作重点
查看>>
Lua中的元表元方法
查看>>
第九章 质量与变更管理
查看>>
Rabbitmq高级特性及集群
查看>>
RocketMq入门
查看>>
RocketMQ高级原理详解
查看>>
RocketMQ应用
查看>>
kafka搭建与使用
查看>>
docke学习内容之二
查看>>
SpringDataJpa学习一
查看>>
springboot中的日志框架
查看>>
springboot的MVC自动配置
查看>>
Springboot中对mvc进行扩展
查看>>