centos7使用iptables作为防火墙方法
查看firewalld状态: systemctl status firewalld
将centos7默认的firewalld停止,并将iptables作为默认防火墙
关闭并禁用firewalld
systemctl stop firewalld
systemctl disable firewalld
接下来要安装iptables服务,centos从7开始默认用的是firewalld,这个是基于iptables的,虽然有iptables的核心,但是iptables的服务是没安装的。
yum install iptables-services
接下来启动并启用iptables
systemctl start iptables
systemctl enable iptables
查看当前iptables状态:systemctl status iptables
如果使用了ipv6,还需要开启ip6tables
启动并启用ip6tables
systemctl start ip6tables
systemctl enable ip6tables

更多关于linux技术分享,详见 http://www.xuecan.net/wenku/17350.html

centos7使用iptables作为防火墙方法的更多相关文章

  1. 保存iptables的防火墙规则的方法【转载】

    转自: 保存iptables的防火墙规则的方法 - 51CTO.COMhttp://os.51cto.com/art/201103/249504.htm 保存iptables的防火墙规则的方法如下: ...

  2. CentOs7 使用iptables防火墙开启关闭端口

    CentOs7 使用iptables防火墙开启关闭端口   # 0x01介绍 iptables命令是Linux上常用的防火墙软件,是netfilter项目的一部分iptables文件设置路径:命令:v ...

  3. CentOS7使用iptables防火墙开放端口

    背景:在CentOS上面安装了mysql.svn.tomcat等软件,发现访问不了,用telnet命令查看端口,发现都不通: telnet IP 端口 CentOS7 默认使用firewalld防火墙 ...

  4. Iptables&Firewalld防火墙

    一.IPtables 1.IPtables入门简介 Netfilter/Iptables(以下简称Iptables)是unix/linux自带的一款优秀且开放源代码的完全自由的基于包过滤的防火墙工具, ...

  5. 阿里云CentOS7系列三 -- 配置防火墙

    前面讲到了安装JDK以及Tomcat.但是大家会发现,当我们访问 http:// XXX.XXX.XXX.XXX:8080/80 时候,tomcat 猫并没有出现.原因就是没有设置防火墙. 再次介绍下 ...

  6. centos7 没有iptables服务 file or directory? 用secureCRT登录centos?

    cenetos7 采用systemd来管理服务 centos7 没有采用传统的iptables服务, 而是采用的firewalld 服务, 以及firewall-cmd 命令; 也可以采用传统的 ip ...

  7. centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod

    centos7启动iptables时报Job for iptables.service failed because the control process exited with error cod ...

  8. 随笔编号-02 阿里云CentOS7系列三 -- 配置防火墙

    前面讲到了安装JDK以及Tomcat.但是大家会发现,当我们访问 http:// XXX.XXX.XXX.XXX:8080/80 时候,tomcat 猫并没有出现.原因就是没有设置防火墙. 再次介绍下 ...

  9. centos7 使用iptables

    关闭selinux,不关闭时,iptables不读取配置文件 重启生效 centos7 中默认的防火墙是firewalld,使用iptables需要先关闭firewalld防火墙,安装iptables ...

随机推荐

  1. win 解除鼠标右键关联

    点击「开始」→「运行」→「输入Regedit」→「确定」,打开注册表编辑器,找到子键: 「HKEY_CLASSES_ROOT\*\shellex\UltroEdit」,删除此项即可:

  2. 在jeecg中如何配置多对一和多对多的关系

    多对多: mappedBy指的是当前的类对应的表, cascade属性的可能值有 all: 所有情况下均进行关联操作,即save-update和delete. none: 所有情况下均不进行关联操作. ...

  3. git分布式版本控制系统权威指南学习笔记(三):简单了解git对象、head以及sha1sum

    文章目录 git对象(简单了解) 对象是存在哪里的? head和master分支 上面的hash值怎么来的? git对象(简单了解) 每次提交都有tree.parent.author.committe ...

  4. Collection map

    HashMap 的工作原理及代码实现 底层数组+链表实现,可以存储null键和null值,线程不安全 初始size为16,扩容:newsize = oldsize*2,size一定为2的n次幂 扩容针 ...

  5. yield迭代器的使用

    class Program { static void Main(string[] args) { List<Student> students = new List<Student ...

  6. jquery $用法

    //页面刷新时,根据筛选条件中已有的项给下面条件添加样式 window.onload = function() { $("input.query1").each(function( ...

  7. Spring Boot跨域问题解决方案

    @Configurationpublic class CorsConfig { @Bean public FilterRegistrationBean corsFilter() { UrlBasedC ...

  8. mysql数据库中某字段一部分乱码

    笔者问题:mysql表(表中数据就是乱码,可能是插入时编码问题,这个问题以后解决)导出excel时数据中有乱码(但是在页面上查看是正常的),我们希望能导出一份没有中文乱码的excel 根据热力站中一次 ...

  9. 【转】console.dir()和console.log()的区别

    原文链接:https://blog.csdn.net/ky1in93/article/details/80828499 console对象详解:https://segmentfault.com/a/1 ...

  10. (PASS)java中nextInt()函数

    一:获取随机数的函数: package test; import java.util.Random; /** * * @ClassName: NextIntDemo * @Description: n ...