一、Centos7使用firewall的管理防火墙

1.firewalld基本使用

  启动:systemctl start firewalld

  关闭:systemctl stop firewalld

  状态:systemctl status firewalld

  开机禁用:systemctl disable firewalld

  开机启用:systemctl enable firewalld

2.配置项目

  例1:开放80端口

  a.开启80端口

  命令:firewall-cmd --zone=public --add-port=80/tcp --permanent    #--permanent永久生效,没有此参数重启后失效

  b.重新加载:

  命令: firewall-cmd --reload  #重新加载后生效

  例2:关闭80端口

  a.删除80端口:

  命令:firewall-cmd --zone=public --remove-port=80/tcp --permanet

  b.重新加载:

  命令: firewall-cmd --reload  #重新加载后生效

  例3:查看已开放的端口

  a.命令:firewall-cmd --zone=public --list-ports

Centos7 使用firewall管理防火墙的更多相关文章

  1. CentOS7使用firewalld管理防火墙与端口

    firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status fir ...

  2. Centos7(Firewall)防火墙开启常见端口命令

    Centos7默认安装了firewalld,如果没有安装的话,则需要YUM命令安装:firewalld真的用不习惯,与之前的iptable防火墙区别太大,但毕竟是未来主流讲究慢慢磨合它的设置规则: 安 ...

  3. CentOS7使用firewalld管理防火墙

    firewalld的基本使用 #启动 systemctl start firewalld #关闭 systemctl stop firewalld #查看状态 systemctl status fir ...

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

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

  5. CentOS7中firewall防火墙详解和配置,.xml服务配置详解

    修改防火墙配置文件之前,需要对之前防火墙做好备份 重启防火墙后,需要确认防火墙状态和防火墙规则是否加载,若重启失败或规则加载失败,则所有请求都会被防火墙 1. firewall-cmd --state ...

  6. Centos7管理selinux及使用firewalld管理防火墙

    CentOS 7.0默认使用的是firewall作为防火墙 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status ...

  7. RHEL7 CentOS7 的 firewall命令简单介绍

    firewall 服务介绍 firewall 服务是 redhat7 和 centos7 系统默认安装好的防火墙服务,一个信任级别的概念来管理与之相关联的连接与接口.它支持 ipv4 与 ipv6,并 ...

  8. Centos7之firewall配置命令

    firewalld的基本使用 查看状态:systemctl status firewalld 启动:systemctl start firewalld 停止:systemctl stop firewa ...

  9. CentOS 7通过Firewall开放防火墙端口

    发现在CentOS 7上开放端口用iptables没效果(或者是sodino没找到正确的命令,传说Centos7 下默认的防火墙是 Firewall,替代了之前的 iptables)… 使用firew ...

随机推荐

  1. vue父组件调用子组件方法

    父组件: 代码 <sampleapplylinemodel ref="sampleapplylinemodel" @reLoad="_fetchRecords&qu ...

  2. PJzhang:Lucifer1993的struts-scan漏洞全量检测工具

    猫宁!!! 参考链接: https://www.freebuf.com/sectool/149815.html 有关struts 2的漏洞测试工具,很多,不过有的已经很久没更新了,有的只是针对某一个s ...

  3. P1228-重叠的图像

    一道很水的topsort,唉?怎么交了14遍...(某人用我的代码刚好卡过,我怎么过不去...[鄙视][鄙视][鄙视]) #include <bits/stdc++.h> using na ...

  4. Java 反射机制详解(下)

    续:Java 反射机制详解(上) 三.怎么使用反射 想要使用反射机制,就必须要先获取到该类的字节码文件对象(.class),通过字节码文件对象,就能够通过该类中的方法获取到我们想要的所有信息(方法,属 ...

  5. iOS 加载Viewcontroller的几种方法

    // 一.根据StoryboardID(需要在Storyboard设置),通过ViewController所在的Storyboard来加载: UIStoryboard *storyboard = [U ...

  6. mysql-SQL语法

    细节查询:http://www.w3school.com.cn/sql/index.asp 1 DDL-data difinition lanuage数据定义语句 使我们有能力创建或删除表格,我们也可 ...

  7. _bzoj1029 [JSOI2007]建筑抢修【贪心 堆】

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1029 经典的贪心问题,不解释. #include <cstdio> #inclu ...

  8. 解决 Cordova命令突然无法使用问题.

    问题背景 之前一直在做 Cordova 方面, 然后准备自己尝试使用 Vue + WebPack 再配合 Cordova 做一个 App . 更新了 npm , 然后然后, 我的 cordova 这个 ...

  9. Backbone学习记录(1)

    去年买的<基于MVC的javascript Web富应用开发>,拖到现在还没看完,作者介绍了三个MVC框架,Spine ,backbone和javascriptMVC.1和2在国内的流行度 ...

  10. [转]VC++中对文件的写入和读取

    本文转自:http://blog.csdn.net/fanghb_1984/article/details/7425705 本文介绍两种方法对文件进行读取和写入操作:1.采用fstream类:2.采用 ...