GXNAS博客

  • 博客会员
    • 注册会员
    • 重置密码
  • 博客文章分类
    • NAS
    • 虚拟化技术
    • 路由器
    • 网站
    • Linux
    • Windows
    • IPTV
    • 游戏
    • 资源下载
    • 其他
  • ”零刻迷你主机“玩机教程
    • 零刻EQ12迷你小主机评测
    • 零刻SER5 5500U打造新潮派HTPC
    • 零刻SEi10玩ESXI+群晖NAS+Ubuntu
    • 零刻EQ13化身迷你静音省电的NAS
    • 零刻EQ13部署双软路由教程
    • 零刻ME Mini搭建群晖NAS教程
  • 阿里云盘资源
    • 阿里云盘资源更新日志
    • 阿里云盘资源分享
    • 阿里云盘扩容福利码
  • 【GXNAS网盘】
  • 【GXNAS小工具】
    • 免费AI绘图
    • 五子棋小游戏
  • 请博主喝奶茶
GXNAS博客
https://wp.gxnas.com
  1. 首页
  2. Linux
  3. 博文内容

CentOS7 关闭防火墙

发布时间:2018年8月16日 3943次浏览 0人点赞 0条评论

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.service
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)
标签: centos
最后更新:2020年1月14日

本文作者:博主

个人简介:(未填写)

打赏 点赞
< 上一篇
下一篇 >

文章评论

您需要 登录 之后才可以评论
站内搜索
分类
  • IPTV / 15篇
  • Linux / 34篇
  • NAS / 252篇
  • Windows / 21篇
  • 其他 / 37篇
  • 游戏 / 3篇
  • 网站 / 126篇
  • 虚拟化技术 / 55篇
  • 资源下载 / 2篇
  • 路由器 / 46篇
归档
统计信息
  • 9
  • 132
  • 3,251
  • 571
  • 16,815
  • 2025年7月25日

© 2025 GXNAS博客 版权所有,未经许可不得转载或引用本站的内容。

COPYRIGHT ALL RIGHTS RESERVED.

网站备案号:桂ICP备18008717号