centos7 不在使用iptables作为防火墙, 而是使用firewalld规则, 好吃是支持动态更新, 不需要重启服务, 第二个就是加入了zone概念. 所以和centos6在防火墙配置上有很大的区别

配置文件:

firewalld配置文件有2个, /usr/lib/firewalld/ (系统配置, 尽量不要修改) 和 /etc/firewalld/ (用户配置)

运行firewalld

systemctl start firewalld

停止firewalld

systemctl disable firewalld

查看运行状态

systemctl status firewalld 或者 firewall-cmd --state

禁用firewalld规则

systemctl stop firewalld

更新防火墙规则

firewall-cmd --reload
firewall-cmd --complete-reload

查看打开的端口

firewall-cmd --zone=dmz --list-ports

加入端口到区域

firewall-cmd --zone=dmz --add-port=/tcp --permanent

后面添加 --permanent 永久生效

删除端口

firewall-cmd --zone= public --remove-port=/tcp --permanent

centos7的防火墙配置的更多相关文章

  1. CentOS7 Firewall防火墙配置用法详解

    centos 7中防火墙是一个非常的强大的功能了,但对于centos 7中在防火墙中进行了升级了,下面我们一起来详细的看看关于centos 7中防火墙使用方法.   FirewallD 提供了支持网络 ...

  2. 【转载】centos7.3 防火墙配置

    firewalld介绍原文:https://www.cnblogs.com/moxiaoan/p/5683743.html 一. centos7 默认有一个防火墙 firewalld,具体使用如下: ...

  3. linux(centos7)防火墙配置firewalld和iptables

    linux系统中防火墙管理有2种方式,分别是iptables和firewalld(centos7.x),下面介绍centos7的配置方法 一.firewalld: 因为cenos7默认使用firewa ...

  4. Centos7.3防火墙配置

    1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewall ...

  5. CentOS7 firewall防火墙配置笔记

    开启端口 # firewall-cmd --zone=public --add-port=/tcp --permanent 命令含义:         --zone #作用域         --ad ...

  6. CentOS7 中防火墙配置

    systemctl  stop firewalld.service  #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 开 ...

  7. Centos7.4 防火墙配置

    # service firewalld status; #查看防火墙状态 (disabled 表明 已经禁止开启启动 enable 表示开机自启,inactive 表示防火墙关闭状态 activate ...

  8. Centos7 Firewall 防火墙配置应用实例参考(转)

    时间:2016-06-02 02:40来源:linux.it.net.cn 作者:IT   简单的配置,参考学习:--permanent  当设定永久状态时 在命令开头或者结尾处加入此参数,否则重载或 ...

  9. CentOS7.2防火墙配置

    一.查看firewall以及firewall服务的状态. # 查看firewall服务状态 systemctl status firewalld # 查看firewall状态 firewall-cmd ...

随机推荐

  1. hdu1251 && hud 1247 (字典树)

    hdu1251 题目 这道题,主要是在主函数的输入输出上犹豫了. #include<stdio.h> #include<cstring> #include<iostrea ...

  2. Delphi Language Overview

    Delphi is a high-level, compiled, strongly typed language that supports structured and object-orient ...

  3. 【WinRT】让控件飞,WinRT 中实现 web 中的 dragable 效果

    由于在 xaml 体系中,控件没有传统 WebForm 中的 Left.Top.Right.Bottom 这些属性,取而代之的是按比例(像 Grid)等等的响应布局.但是,传统的这些设置 Left.T ...

  4. Tmux与Oh-my-zsh环境整合

      在Mac客户端配置好oh-my-zsh后,安装了tmux应用,但是每次进入tmux都会提示以下警告信息,虽然并没有实际上的影响,但是还是感觉每次弹出窗口后会很闹心,所以采用如下配置进行解决. 报错 ...

  5. ModuleNotFoundError: No module named 'sqlite'

    解决 ModuleNotFoundError: No module named 'sqlite'.问题 今天在将Python2.7升级至Python3.6后导入sqlite模块时出现了一下报错,到网上 ...

  6. App主导现在 HTML5领衔未来

    HTML5能够让开发人员构建丰富的基于Web应用程序,使其能在任何设备中使用标准的Web浏览器.很多人认为HTML5将会让App过时.到底App还是HTML5会是谁赢得最后的胜利,在业界也有不少讨论, ...

  7. Ajax异步请求阻塞情况的解决办法

    最近使用ExtJs4的mvc模式在开发了在线漫画的后台,因为异步请求比较多,有的回应时间长,有点短.我发现在多次并发的情况下,会造成阻塞的情况.也就是说如果回应时间长的请求还在进行中,短的请求却被挂起 ...

  8. WPF 自定义下拉列表

    XAML代码: <Popup x:Name="popupStrategy" StaysOpen="False" PopupAnimation=" ...

  9. JAVA 从头开始<三>

    一.数据类型转换 取反:1变0,0变1 强转 Insteger.toBinaryString(-7); 下面这样写会出错,要用l来接收 为什么byte b 可以接收int类型(而不是10b),大数据类 ...

  10. xt

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...