# 停止firewalld服务

systemctl stop firewalld

systemctl mask firewalld

# 安装iptables-services

yum install iptables-services

Enable the service at boot-time:

# 启动iptables服务

systemctl enable iptables

# 管理iptables

systemctl [stop|start|restart] iptables

# 保存规则

service iptables save 或者 /usr/libexec/iptables/iptables.init save

centos7不再使用iptables,而是使用firewalld
若不想使用firewalld,继续使用iptables,可以停掉firewalld,并且安装iptables-services包
systemctl stop firewalld
systemctl disable firewalld
yum install -y iptables-services
systemctl enable iptables
systemctl start iptables

CentOS 7 使用iptables防火墙的更多相关文章

  1. CentOS切换为iptables防火墙并进行相关配置

    CentOS切换为iptables防火墙 切换到iptables首先应该关掉默认的firewalld,然后安装iptables服务. 1.关闭firewall: service firewalld s ...

  2. CentOS下配置iptables防火墙 linux NAT(iptables)配置

    CentOS下配置防火墙 配置nat转发服务CentOS下配置iptables防火墙 linux NAT(iptables)配置 CentOS下配置iptables 1,vim /etc/syscon ...

  3. CentOS 7设置iptables防火墙开放proftpd端口

    由于ftp的被动模式是这样的,客户端跟服务器端的21号端口交互信令,服务器端开启21号端口能够使客户端登录以及查看目录.但是ftp被动模式用于传输数据的端口却不是21,而是大于1024的随机或配置文件 ...

  4. CentOS 7 设置iptables防火墙开放proftpd端口

    由于ftp的被动模式是这样的,客户端跟服务器端的21号端口交互信令,服务器端开启21号端口能够使客户端登录以及查看目录.但是ftp被动模式用于传输数据的端口却不是21,而是大于1024的随机或配置文件 ...

  5. centos 7 安装iptables防火墙

    firewalle: 开启6379端口和16379端口 [root@localhost ~]# firewall-cmd --zone=public --add-port=6379/tcp --per ...

  6. CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙

    官方文档介绍地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gui ...

  7. linux设置iptables防火墙的详细步骤(centos防火墙设置方法)

    CentOS系统也是基于linux中的它的防火墙其实就是iptables了,下面我来介绍在CentOS防火墙iptables的配置教程,希望此教程对各位朋友会有所帮助.   iptables是与Lin ...

  8. CentOS 7.4中firewall防火墙详解和配置以及切换为iptables防火墙

    转载:https://blog.csdn.net/xlgen157387/article/details/52672988 一.firewall介绍 CentOS 7中防火墙是一个非常的强大的功能,在 ...

  9. CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙--转载

    最近在linux(这里用到的是Centos7的64位版本)安装nginx时,在开放80端口时用iptables设置端口 和重启服务发现提示未找到文件,在网络上收集查找后发现在Centos7中iptab ...

随机推荐

  1. 数组的创建和各种API

    数组的创建方式: 1. 数组直接量 var arr = [] // 创建一个空数组 var arr = [1,2,3,4] // 创建同时初始化元素 2. 实例化对象 var arr=new Arra ...

  2. dedecms v5.7 图片集“图集内容”无法调用的解决办法

    在dedecms的图片集模型或者基于图片集模型修改的自定义模型中 内容页模板使用 {dede:field.body/} 方式来调用body字段是没有输出的(原因不明,未继续深入) 但有些时候当需要在内 ...

  3. javaScript中关于字符串的操作函数和方法

    1.字符串转换 toString():可以将任何类型的数据都转换为字符串 var num= 19; //19 var myStr = num.toString(); //"19" ...

  4. [转] 分享一个快的飞起的maven的settings.xml文件

    <?xml version="1.0"?> <settings> <localRepository>/home/yizhen/.m2/repos ...

  5. maven 阿里云仓库配置

    <!-- 设定主仓库,按设定顺序进行查找. --> <repositories> <repository> <id>nexus-aliyun</i ...

  6. rsync - 远程同步工具

    一直没有对这个命令太有深入的理解 简介 rsync 即 remote sync,一个远程与本地文件同步工具.rsync 使用的算法能够最小化所需复制的数据,因为它只移动那些修改了的文件. rsync ...

  7. Linkin大话Java和internet概念

    整理电脑,无意中翻到不知道哪里来的文章,觉得里面写的很好,仔细看过一遍后,整理了下贴了出来,其中的好多概念我觉得讲的很透彻. 既然Java不过另一种类型的程序设计语言,为什么还有这么多的人认为它是计算 ...

  8. MongoDB投影有$slice如何只显示该字段

    简单的投影 稍微用过MongoDB的都知道,投影很简单,就直接 db.student.find({_id:ObjectId('5a5085aed8f10c1a6cc0395b')},{comments ...

  9. php curl模拟登陆抓取数据

    http://www.cnblogs.com/zengguowang/p/6814474.html

  10. ORACLE数据库链接

    在ORACLE里面,远程数据访问,像查询.更新等可以通过Database Link来实现.数据库连接需要在建立Database Link的两台机子上都运行Oracle Net(以前叫SQL*NET 和 ...