一、停止并禁用firewalld

  1. [root@test ~]# systemctl stop firewalld
  2. [root@test ~]# systemctl disable firewalld
  3. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
  4. Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

二、查看iptables 列表,并安装service 软件

  1. [root@test ~]# yum list all iptables*
  2. 已加载插件:fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.neusoft.edu.cn
  5. * extras: mirrors.tuna.tsinghua.edu.cn
  6. * updates: mirrors.sina.cn
  7. 已安装的软件包
  8. iptables.x86_64 1.4.-.el7 @base
  9. 可安装的软件包
  10. iptables.i686 1.4.-.el7 base
  11. iptables-devel.i686 1.4.-.el7 base
  12. iptables-devel.x86_64 1.4.-.el7 base
  13. iptables-services.x86_64 1.4.-.el7 base
  14. iptables-utils.x86_64 1.4.-.el7 base

安装service

  1. [root@test ~]# yum install iptablesyum install iptables-services.x86_64 -y

三、启动iptables服务,并检查状态

  1. [root@test ~]# systemctl start iptables
  2. [root@test ~]# systemctl status iptables
  3. iptables.service - IPv4 firewall with iptables
  4. Loaded: loaded (/usr/lib/systemd/system/iptables.service; disabled; vendor preset: disabled)
  5. Active: active (exited) since -- :: CST; 9s ago
  6. Process: ExecStart=/usr/libexec/iptables/iptables.init start (code=exited, status=/SUCCESS)
  7. Main PID: (code=exited, status=/SUCCESS)
  8.  
  9. 8 :: test systemd[]: Starting IPv4 firewall with iptables...
  10. 8 :: test iptables.init[]: iptables: Applying firewall rules: [ OK ]
  11. 8 :: test systemd[]: Started IPv4 firewall with iptables.

四、加入开机自启动

  1. [root@test ~]# systemctl enable iptables
  2. Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.

Centos7 禁止firewalld并使用iptables 作默认防火墙的更多相关文章

  1. Centos7 禁止firewalld并使用iptables 作默认防火墙以及忘记root密码的处理方法

    一.停止并禁用firewalld [root@test ~]# systemctl stop firewalld [root@test ~]# systemctl disable firewalld ...

  2. centos7 关闭默认firewalld,开启iptables

    编者按: 对于使用了centos6系列系统N年的运维来说,在使用centos7的时候难免会遇到各种不适应.比如防火墙问题.本文主要记录怎么关闭默认的firewalld防火墙,重新启用iptables. ...

  3. CentOS7关闭默认防火墙启用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...

  4. Ubuntu下使用UFW,以及CentOS7的默认防火墙firewalld

    UFW是一个简化版的iptables,基于iptables,配置比iptables简单 默认UFW是关闭状态,即Ubuntu默认打开所有端口,比较危险. 检测状态 ufw status 设置默认状态, ...

  5. CentOS7.3下的一个iptables配置

    centos7.3默认使用的防火墙应该是firewall,而不是iptables.而我们xxmj服务器使用的是iptables防火墙.所以,在配置防火墙之前,我们需要先关闭firewall,安装ipt ...

  6. CentOS7的firewall和安装iptables

    前言:CentOS7 的防火墙默认使用是firewall,而我们通常使用iptables: 本文记录了firewall基础的命令和iptables的安装和使用. firewall部分: part1 : ...

  7. CentOS7中firewalld的安装与使用详解

    一.软件环境 [root@Geeklp201 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) 二.安装firewall ...

  8. 转 CentOS7使用firewalld打开关闭防火墙与端口

    http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...

  9. (转)CentOS 7.0关闭默认防火墙启用iptables防火墙

    场景:在本地虚拟机上使用ftp软件需要进行相应的端口设置,不可避免要访问Cnetos的防火墙,默认firewall操作不方便,所以需要进行相应的替换. 1 配置防火墙,开启80端口.3306端口 1. ...

随机推荐

  1. [mongodb-10gen]ubuntu下安装方法

    由于自己老是不死心,所以还是继续在UBUNTU下开始我的GOLANG,今天发现服务源很快一下子就把GO的源代码从GoogleProject上给hg回来了,所以今天才查了一下在UBUNTU下安装Mong ...

  2. 小白学数据分析----->什么才是留存率的关键?

    最近花了很多的时间在体验各种游戏,从火爆的卡牌,到策略,RPG等等,有一个问题在影响我,什么才是留存率的关键?今天就先讨论一些我的想法. 留存率已经成为大家最常提到的词汇,也是拿出来show一下的武器 ...

  3. Android 代码混淆、第三方平台加固加密、渠道分发 完整教程(图文)

    第一步:代码混淆(注意引入的第三方jar) 在新版本的ADT创建项目时,混码的文件不再是proguard.cfg,而是project.properties和proguard-project.txt. ...

  4. Angular学习笔记--last_update 20151106

    参考来源:http://www.angularjs.cn/tag/AngularJS?p=1&s=50 基本要求:一周搞定33篇学习文章 目标:develop/refactor lms系统an ...

  5. IE11新文档模式Edge介绍与评估,及在WebBrowser应用中的使用。

    浏览器模式与文档模式概念是怎么来的? 1.浏览器模式与文档模式概念起源 为了解决兼容性的问题,在IE浏览器(IE8, IE9, IE10)中,引入了浏览器模式和文档模式两个概念,浏览网页时可以通过按F ...

  6. python数据结构之栈、队列的实现

    这个在官网中list支持,有实现. 补充一下栈,队列的特性: 1.栈(stacks)是一种只能通过访问其一端来实现数据存储与检索的线性数据结构,具有后进先出(last in first out,LIF ...

  7. android 常用类

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/38965311,本文出自[张鸿洋的博客] 打开大家手上的项目,基本都会有一大批的辅 ...

  8. Ubuntu server下搭建Maven私服Nexus

    Ubuntu server下搭建Maven私服Nexus Maven私服Nexus的作用,主要是为了节省资源,在内部作为maven开发资源共享服务器来使用. 1.下载 通过root用户进去Ubuntu ...

  9. [Scheme]一个Scheme的Metacircular evaluator

    这个解释器可以用来跑前面两篇文章的例子,所以一并扔出来,三部曲哈哈. Lisp内置的S-expression相当于解析好的语法树,而借助quasiquote和unquote又很容易进行语法树层面的变换 ...

  10. 使用 CountDownLatch 控制多个线程执行顺序

    已同步更新至:http://dxjia.cn/2015/08/countdownlatch-use/ 有时候会有这样的需求,多个线程同时工作,然后其中几个可以随意并发执行,但有一个线程需要等其他线程工 ...