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)

CentOS7防火墙问题的更多相关文章

  1. Centos7防火墙快速开放端口配置方法

    ▲这篇文章主要为大家详细介绍了Centos7防火墙开放端口的快速方法,感兴趣的小伙伴们可以参考一下! Firewalld服务是红帽RHEL7系统中默认的防火墙管理工具,特点是拥有运行时配置与永久配置选 ...

  2. CentOS7 防火墙(firewall)的操作命令

    CentOS7 防火墙(firewall)的操作命令 安装:yum install firewalld 1.firewalld的基本使用 启动: systemctl start firewalld 查 ...

  3. [转帖]Centos7防火墙配置rich-rule实现IP端口限制访问

    Centos7防火墙配置rich-rule实现IP端口限制访问 2019-02-18 18:05:35 sunny05296 阅读数 2143  收藏 更多 分类专栏: Linux   版权声明:本文 ...

  4. (三) Docker 常用操作与CentOS7 防火墙命令

    参考并感谢 Docker 常用命令 https://docs.docker.com/engine/reference/commandline/docker/ Docker 登录docker账户 doc ...

  5. CentOS7 防火墙设置

    CentOS7 防火墙命令 最近在公司服务器上安装了oracle12c数据库,在用数据库客户端连接的时候,连接不了.最后查找资料的原因是因为oracle的服务端口未开放. 首先还是还是输入以往的开启某 ...

  6. CentOS7防火墙firewalld 和 CentOS6防火墙iptables的一些配置命令

    CentOS7 防火墙 一.防火墙的开启.关闭.禁用.查看状态命令 (1)启动防火墙:systemctl start firewalld (2)关闭防火墙:systemctl stop firewal ...

  7. centos6和centos7防火墙的关闭

    CentOS6.5查看防火墙的状态: [zh@localhost ~]$service iptable status 显示结果: [zh@localhost ~]$service iptable st ...

  8. Centos7 防火墙简介(一)

    Centos7下的防火墙默认是通过一个守护进程(firewalld)为网络(network) 以及与之相关的连接(connections)和接口(interface)提供一个可信层,同时支持网络空间( ...

  9. CentOS7防火墙

    一.CentOS7依然使用iptables的方法 CentOS7不再使用iptables,而是使用firewalld,若不想使用firewalld,可以停掉firewalld并且安装iptables- ...

  10. centos7防火墙那些事

    转发设置 firewall-cmd --permanent  --add-forward-port=port=80:proto=tcp:toport=8080 firewall-cmd --perma ...

随机推荐

  1. java爬虫系列目录

    1. java爬虫系列第一讲-爬虫入门(爬取动作片列表) 2. java爬虫系列第二讲-爬取最新动作电影<海王>迅雷下载地址 3. java爬虫系列第三讲-获取页面中绝对路径的各种方法 4 ...

  2. TrieTree

    学习链接:https://blog.csdn.net/lisonglisonglisong/article/details/45584721 前缀树解决字符串前缀匹配问题,查找单词是否存在,统计以如“ ...

  3. Python二级-----------程序冲刺2

    1. 编写 Python 程序输出一个具有如下风格效果的文本,用作文本进度条样式,部分代码如下,填写空格处.‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬ ...

  4. 海康&大华&DSS视频拉流-RTSP转RTMP多媒体播放技术

    海康&大华&DSS获取RTSP 实时流 海康:rtsp://[username]:[password]@[ip]:[port]/[codec]/[channel]/[subtype]/ ...

  5. php禁用函数设置及查看方法详解

    这篇文章主要介绍了php禁用函数设置及查看方法,结合实例形式分析了php禁用函数的方法及使用php探针查看禁用函数信息的相关实现技巧,需要的朋友可以参考下 本文实例讲述了php禁用函数设置及查看方法. ...

  6. Windows环境npm无法生效

    上网查询得知安装完nodejs之后配置windows环境变量只能保证在命令行工具中可以使用npm,如果想在git bash中使用需要再安装一遍 安装后记得配置环境变量

  7. ArcPy 拷贝数据库

    使用Python脚本进行图形数据库的拷贝. 原始帖子地址:https://www.2cto.com/database/201302/187391.html 整理Python代码: # -*- codi ...

  8. C# 利用键值对取代Switch...Case语句

    swich....case 条件分支多了之后,会严重的破坏程序的美观性. 比如这个 上述代码是用于两个进程之间通信的代码,由于通信的枚举特别的多,所以case的分支特别的多.导致了代码的可读性,可维护 ...

  9. MySQL 基础知识梳理学习(六)----锁

    1.什么是锁: 对共享资源进行并发访问控制,提供数据的完整性和一致性. 2.锁的区别: 类型 lock latch 对象 事务 线程 保护 数据库内容 内存数据结构 持续时间 整个事务过程 临界资源 ...

  10. 『Shell编程』学习记录(2)

    例1.文件io #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include & ...