一、firewalld的基本使用

  启动: systemctl start firewalld
  关闭: systemctl stop firewalld
  查看状态: systemctl status firewalld 
  开机禁用  : systemctl disable firewalld
  开机启用  : systemctl enable firewalld
 
二、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
 
三、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
 
四、添加删除放行端口
 
  添加:irewall-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

Linux 之CentOS7使用firewalld打开关闭防火墙与端口的更多相关文章

  1. CentOS7使用firewalld打开关闭防火墙与端口(转载)

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

  2. 关于学习CentOS7使用firewalld打开关闭防火墙和端口

    1.firewalld简介 firewalld是centos7的一大特点,主要有两个优点:一是支持动态更新,不需要重启服务:二就是加入了防火墙的“zone”概念. firewalld有图形界面和工具界 ...

  3. CentOS7使用firewalld打开关闭防火墙与端口(转)

    CentOS7使用firewalld打开关闭防火墙与端口       1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop ...

  4. 转 CentOS7使用firewalld打开关闭防火墙与端口

    http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...

  5. CentOS7使用firewalld打开关闭防火墙与端口

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

  6. CentOS7 使用firewalld打开关闭防火墙与端口

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

  7. CentOS7 使用firewalld打开关闭防火墙以及端口

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

  8. CentOS7使用firewalld打开关闭防火墙与端口[转]

    转自:http://www.cnblogs.com/moxiaoan/p/5683743.html1.firewalld的基本使用启动: systemctl start firewalld查看状态: ...

  9. 莫小安 CentOS7使用firewalld打开关闭防火墙与端口

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

随机推荐

  1. webpack打包的基础原理-打包后的文件解读

    1.概念 本质上,webpack 基于node平台,利用 node 的各种api来实现 javascript 应用程序的一个静态模块的打包工具. 在打包过程中,构建依赖关系,并且实现模块引用预处理,以 ...

  2. python基础学习之02 元组

    #encoding=utf-8 # 元组与列表一样,也是一种序列 print (1,2,3) print 1,2,3 print(1,) print 1, a=1 print(type(a)) a=1 ...

  3. 畅谈HTML开发

    现在,打开浏览器,各种各样的页面可以让人眼花缭乱,对于行外人看到的是美观效果是用户体验,对行内人很多其它的是关注技术和创造力. 对于开发者都知道DIV是一对html经常使用标签,DIV+CSS是一对非 ...

  4. ViewPager + Handler 实现的图片自己主动轮播

    首先上图看效果 我也是在网上看各种大牛们做的效果,非常多都是自己定义重写了一些控件来实现这个效果的. 我把当中的一位大牛写的ViewPager的效果加上了Handler实现了自己主动轮播效果.在此做个 ...

  5. Ubuntu下用hadoop2.4搭建集群(伪分布式)

    要真正的学习hadoop,就必需要使用集群,可是对于普通开发人员来说,没有大规模的集群用来測试,所以仅仅能使用伪分布式了.以下介绍怎样搭建一个伪分布式集群. 为了节省时间和篇幅,前面一些步骤不再叙述. ...

  6. sqlite 数据库 相关知识

    一基本简单介绍 SQLite 是一个自持的(self-contained).无server的.零配置的.事务型的关系型数据库引擎.由于他非常小,所以也能够作为嵌入式数据库内建在你的应用程序中. SQL ...

  7. cocos2D(七)---- CCScene

    CCScene普通情况是游戏里面的根节点.称之为"场景",执行游戏时须要通过CCDirector启动第一个场景. 当然,游戏略微复杂一点的话.可能会包括非常多个场景,这就涉及到场景 ...

  8. R语言学习笔记-Error in ts(x):对象不是矩阵问题解决

    1.问题 在对时间序列进行拟合操作时,发生:Error in ts(x):对象不是矩阵的错误,而直接在arima()函数中使用时没有问题的. > sample<-c2 > sampl ...

  9. STM32跑马灯

    #include "stm32f10x.h" #include "led.h" #include "delay.h" #include &q ...

  10. 查找两个大文件(1G以上)的相同内容PHP版

    这是是一个大文件处理,面试官出题的意图并不希望你两层for循环进行遍历,这种答案肯定是不会要的! 这道题目的解法思路是: 顺序读取两个文件的的全部记录 将每条记录经过hash->转换为10进制- ...