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 关闭防火墙 1.firewall相关的操作    查看防火墙状态 firewall-cmd    --state 关闭防火墙 systemctl  stop   firewalld.s ...

  2. CentOS7 关闭防火墙和selinux

    本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux. 关闭防火墙 # 查看防火墙状态 [root@localhost ~]# systemctl status firewalld ...

  3. centOS7关闭防火墙的命令

    centOS7下关闭防火墙的命令已经改了,如下:      systemctl stop firewalld

  4. centos 6和centos7关闭防火墙的方法

    centos 6 关闭命令:  service iptables stop 永久关闭防火墙:chkconfig iptables off 两个命令同时运行,运行完成后查看防火墙关闭状态         ...

  5. Centos7 关闭防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下 1.直接关闭防火墙 systemctl stop firewalld.service #停止firew ...

  6. Centos7 关闭防火墙(转)

    转载地址:http://www.cnblogs.com/silent2012/archive/2015/07/28/4682770.html CentOS 7.0默认使用的是firewall作为防火墙 ...

  7. Centos7 关闭防火墙(Firewalld ),使用防火墙(iptables)

    1.直接关闭防火墙 systemctl stop firewalld.service: #停止firewall systemctl disable firewalld.service: #禁止fire ...

  8. CentOS7关闭防火墙方法

    在之前的版本中关闭防火墙等服务的命令是 service iptables stop /etc/init.d/iptables stop 在RHEL7中,其实没有这个服务 [root@rhel7 ~]# ...

  9. Centos7关闭防火墙与selinux

    CentOS 7.0默认使用的是firewall作为防火墙 直接关闭防火墙 systemctl stop firewalld.service #停止firewall systemctl disable ...

随机推荐

  1. python学习——练习题(11)

    """ 题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少? 1 1 2 ...

  2. Linux内核系统调用列表

    一.进程控制: fork 创建一个新进程 clone 按指定条件创建子进程 execve 运行可执行文件 exit 中止进程 _exit 立即中止当前进程 getdtablesize 进程所能打开的最 ...

  3. 「小程序JAVA实战」小程序的基础组件(24)

    转自:https://idig8.com/2018/08/12/xiaochengxu-chuji-24/ 来说下 ,小程序的基础组件.源码:https://github.com/limingios/ ...

  4. Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA

    找到原先备份的项目,把 .idea 文件夹重新覆盖,解决问题.

  5. GameObject.DestroyImmediate(go, true)会使磁盘资源数据丢失,导致不可用

    GameObject.DestroyImmediate(go, true)会使磁盘资源数据丢失,导致不可用 第二个参数true表示 allowDestroyingAssets,表示允许销毁资源. 实测 ...

  6. Python修饰器讲解

    转自:http://www.cnblogs.com/rollenholt/archive/2012/05/02/2479833.html 文章先由stackoverflow上面的一个问题引起吧,如果使 ...

  7. 使用Windows绘图合成多张图

    [使用Windows绘图合成多张图] 1.点击图片右键选择打开方式→选择画图工具打开图片. 2.这时图片可以改变外框大小,将外框尽量弄大些. 3.点击编辑选中下拉菜单中的粘贴来源,选择需要增加进来的图 ...

  8. HQL多表查询

    ------------------siwuxie095 HQL 多表查询 以客户和联系人为例(一对多) 1.内连接 (1)hql 语句写法 from Customer c inner join c. ...

  9. KVC的底层实现原理

    KVC是OC特有的,本质是在运行时动态的给对象发送setValue:forKey 消息,设置数值 -调用super.init 保证对象已经被创建完成 .当给对象发送setValue:forKey 消息 ...

  10. Python——字典与字典方法

    字典是一种通过名字或者关键字引用的得数据结构,其键可以是数字.字符串.元组,这种结构类型也称之为映射.字典类型是Python中唯一內建的映射类型,基本的操作包括如下: (1)len():返回字典中键— ...