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. 基础概念PHP-FPM、FastCGI和CGI

    在搭建 LAMP/LNMP 服务器时,会经常遇到 PHP-FPM.FastCGI和CGI 这几个概念.如果对它们一知半解,很难搭建出高性能的服务器.接下来我们就以图形方式,解释这些概念之间的关系. 基 ...

  2. 1.2 Cesium渲染流程

    “从前有座山,山里有座庙,庙里有个......”我们喜欢这样讲故事,有头有尾巴.Cesium实时刷新,就是说每一帧都在更新,(但这也是一般状态下,如果场景完全静悄悄也可请求渲染模式,这时就不是每一帧都 ...

  3. ArcPy 拷贝数据库

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

  4. 关于Fragment里面嵌套fragment

    今天看到一篇好文章 https://www.2cto.com/kf/201609/545979.html 转载过来记录一下,往后需要的时候可以随时查看: 接下来进入正题: 动态fragment的使用 ...

  5. python自定义pi函数的代码

    下边内容是关于python自定义pi函数的内容. def pi(): # Compute digits of Pi. # Algorithm due to LGLT Meertens. k, a, b ...

  6. centos7安装、配置、卸载jdk1.8

    环境: centos7 64bit jdk-8u121-linux-x64 一.安装jdk 1.安装jdk rpm -ivh jdk-8u121-linux-x64.rpm 2.查看是否安装成功 ja ...

  7. JAVA EE获取浏览器和操作系统信息

    一.原理说明:  1. 浏览器访问服务端时,Http请求头上会带上客户端一些信息,可通过"user-agent"获取. //java获取方法如下,其他语言也有自己获取方法 Stri ...

  8. Microsoft Store应用安装路径和应用推荐——如何用Linux命令操控windows

    本人是cnblog萌新,刚学编程不久的菜鸟,这是我的第一篇博客,请各位轻喷 Microsoft store安装路径: 相信很多人都跟我一样有强迫症,文件找不到安装目录就不舒服.一开始在系统盘找不到Wi ...

  9. 基于mysql的一些sql语法

    Sql: distinct: select distinct * from tea; Tea中每行的数据必有不同,若有两行相同的,则只输出一行 Limit: select * from stu lim ...

  10. Linux新手随手笔记1.7

    配置网卡(本地电脑) Vment1   仅主机模式 Vment8   nat模式 物理机 : 192.16810.1  /255.255.255.0 服务器 : 192.168.10.10 /255. ...