1、firewalld的基本使用
启动: systemctl start firewalld
查看状态: systemctl status firewalld 
停止: systemctl disable firewalld
禁用: systemctl stop firewalld
 
2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。

启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed

3.配置firewalld-cmd

查看版本: firewall-cmd --version
查看帮助: firewall-cmd --help
显示状态: firewall-cmd --state
查看所有打开的端口: firewall-cmd --zone=public --list-ports
更新防火墙规则: firewall-cmd --reload
查看区域信息:  firewall-cmd --get-active-zones
查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
拒绝所有包:firewall-cmd --panic-on
取消拒绝状态: firewall-cmd --panic-off
查看是否拒绝: firewall-cmd --query-panic
 
4.开启一个端口
添加
firewall-cmd --zone=public --add-port=80/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=80/tcp
删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent
 

CentOS7防火墙firewalld的更多相关文章

  1. CentOS7防火墙firewalld 和 CentOS6防火墙iptables的一些配置命令

    CentOS7 防火墙 一.防火墙的开启.关闭.禁用.查看状态命令 (1)启动防火墙:systemctl start firewalld (2)关闭防火墙:systemctl stop firewal ...

  2. fedora/centos7防火墙FirewallD详解

    1 使用 FirewallD 构建动态防火墙 1.1 “守护进程” 1.2 静态防火墙(system-config-firewall/lokkit) 1.3 使用 iptables 和 ip6tabl ...

  3. CentOS7 防火墙firewalld详细操作

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

  4. Centos7 防火墙 firewalld 实用操作

    一.前言 Centos7以上的发行版都试自带了firewalld防火墙的,firewalld去带了iptables防火墙.其原因是iptables的防火墙策略是交由内核层面的netfilter网络过滤 ...

  5. CentOS7防火墙firewalld使用

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

  6. 5分钟理解Centos7防火墙firewalld

    版权声明:本内容为原创内容,转载请声明出处. 原文地址:http://www.excelib.com/article/287/show firewalld简介 Centos7中默认将原来的防火墙ipt ...

  7. CentOS7防火墙firewalld设置

    添加80端口  重启后永久生效 firewall-cmd --zone=public --add-port=80/tcp --permanent   查看防火墙状态 systemctl status ...

  8. Centos7 防火墙firewalld配置

    开启80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent  出现success表明添加成功 移除某个端口 firewall-cmd ...

  9. centos7防火墙firewalld拒绝某ip或者某ip段访问服务器任何服务

    安装firewall后(LINUX7系统一般情况下默认已安装),防火墙默认配置是只打开SSH端口的,也就是22端口,如果SSH的端口已更改成别的端口了,请切记一定在启动firewall前先修改对应服务 ...

随机推荐

  1. [elk]logstash&filebeat常用语句

    filebeat安装dashboard 参考: https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-getting-star ...

  2. JS 16进制加密解密

    http://www.zc520.cc/js/62.html <script type="text/javascript"> function JavaDe(){ va ...

  3. Django--ORM基础

    ORM(映射关系) 映射关系: 表名 <-------> 类名 字段 <-------> 属性 表记录 <------->类实例对象 创建表(建立模型) 在Djan ...

  4. java中的Closeable接口

    一.概述 该接口位于java.io包下,声明例如以下:public interface Closeable Closeable 是能够关闭的数据源或目标. 调用 close 方法可释放对象保存的资源( ...

  5. redis源码学习_字典

    redis中字典有以下要点: (1)它就是一个键值对,对于hash冲突的处理采用了头插法的链式存储来解决. (2)对rehash,扩展就是取第一个大于等于used * 2的2 ^ n的数作为新的has ...

  6. InnoDB:表

    数据在表中是如何进行组织存放的?下面我们就来看看: InnoDB引擎表的类型 InnoDB表都会有一个主键. 如果没有显示的指定主键,首先会去查找,看是否有非空的唯一索引, 如果有,则该列为主键:如果 ...

  7. 河南省第七届ACM程序设计大赛赛后总结

    我们学校ACM集训开始于4月5号(清明节),5月25日在郑州解放军信息工程大学举办,集训耗时50天,但是感觉效果还行,但是也不是太好:我们也已经尽力了,虽然说只拿了个银牌,每份收获的背后,都会有辛勤的 ...

  8. hMailServer之发送附件大小限制

    hMailServer发送附件大小限制有以下几个地方: 1.php配置 参考 .post_max_size = 10M 表单提交最大数据为10M.此项不是限制上传单个文件的大小,而是针对整个表单的提交 ...

  9. toString() 和 (String) 以及 valueOf() 三者的对照关系[java]

    简述 在Java中,往往需要把一个类型的变量转换成String 类型.作为菜鸟,有时候我会使用(String) data,有时候就使用data.toString(),如果不行还会试试 String.v ...

  10. 修改storm ui 默认端口

    vim conf/storm.yaml 在下面添加 ui.port: 8080