1、firewalld的基本使用
  启动: systemctl start firewalld
  关闭: systemctl stop firewalld
  查看状态: systemctl status firewalld 
  开机禁用  : systemctl disable firewalld
  开机启用  : systemctl enable 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
  删除
    irewall-cmd --zone=public --remove-port=80/tcp --permanent

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打开关闭防火墙与端口

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

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

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

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

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

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

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

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

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

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

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

  10. Linux 之CentOS7使用firewalld打开关闭防火墙与端口

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

随机推荐

  1. Linux—Ubuntu14.0.5安装Redis

    1.前言 Redis是常用基于内存的Key-Value数据库,比Memcache更先进,支持多种数据结构,高效,快速.用Redis可以很轻松解决高并发的数据访问问题:做为时时监控信号处理也非常不错. ...

  2. Sigma Function 数学 因子求和

    Sigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma ...

  3. mongodb--游标与链式查找

    一:游标 [能不用游标的地方就不要用游标,它是占用数据库资源的] find操作是返回一个游标,为了方便我们查看结果,mongodb shell会自动迭代结果.[游标也是递增的] 2.迭代结果的两种方式 ...

  4. java中类的路径为什么这么长

  5. 怎样从C++代码直接訪问android framework层的WifiService

    说究竟,Java层的service就是就C++层的binder的封装.所以从原理上来讲通过C++代码直接訪问android framework层的service是全然可能的,这篇文章以訪问WifiSe ...

  6. 并查集图冲突hdu1272

    还是属于并查集的变形 两个点仅仅有一条路径连通 给出的两个点事先都是属于两个集合的 须要给出的着条边构成一个集合 算法复杂度还是挺高的 每一个我都循环了100000次 set2数组没清空 wrong了 ...

  7. iOS 8 UI布局 AutoLayout及SizeClass(二)

    一.新特性Size Class介绍 随着iOS8系统的公布,一个全新的页面UI布局概念出现,这个新特性将颠覆包含iOS7及之前版本号的UI布局方式,这个新特性就是Size Class. Size Cl ...

  8. ZOJ2588 Burning Bridges 无向图的割边

    题目大意:求无向图的割边编号. 割边定义:在一个连通图中,如果删去一个边e,图便变成不连通的两个部分,则e为该图的割边. 求法:边(u,v) 不是割边,当且仅当边(u,v)在一个环内.因此所有不在环内 ...

  9. Windows下Go语言LiteIDE下载及安装

    下载地址为 https://www.golangtc.com/download/liteide  我下载的是liteidex32.1windows-qt4.zip,下载之后解压,并将liteide文件 ...

  10. xml配置文件中的转义字符

    https://stackoverflow.com/questions/14607920/the-character-breaks-passwords-that-are-stored-in-the-w ...