1.查看防火墙状态
systemctl list-unit-files|grep firewalld.service

systemctl status firewalld.service 2.开启
systemctl start firewalld.service 3.停止
systemctl stop firewalld.service 4.重启
systemctl restart firewalld.service 5.开机启动
systemctl enable firewalld.service 6.开机禁止启动
systemctl disable firewalld.service 7.查看开机是否自启
systemctl is-enabled firewalld.service;echo $? 8.列举出所有开机自启服务
systemctl list-unit-files|grep enabled 9.查看已经开放端口
firewall-cmd --list-ports 10.添加开放端口(重启防火墙才生效)
firewall-cmd --zone=public --add-port=80/tcp --permanent
--zone 作用域
--add--port 添加端口号
--permanent 永久生效 不用的话重启机器失效
11.重启防火墙
firewall-cmd --reload 12.防火墙运行状态
firewall-cmd --state

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

  1. CentOS7防火墙设置常用命令

    目录 开/关/重启防火墙 查看所有开启的端口号 CentOS7环境下防火墙常用命令 开/关/重启防火墙 查看防火墙状态 firewall-cmd --state 启动防火墙 systemctl sta ...

  2. CentOS7 防火墙设置

    CentOS7 防火墙命令 最近在公司服务器上安装了oracle12c数据库,在用数据库客户端连接的时候,连接不了.最后查找资料的原因是因为oracle的服务端口未开放. 首先还是还是输入以往的开启某 ...

  3. linux CentOS7 防火墙操作

    1, 查看防火墙状态: firewall-cmd --state systemctl status firewalld.service 2, 开启防火墙: systemctl start firewa ...

  4. Linux下防火墙设置

    Linux下开启/关闭防火墙命令  1) 永久性生效,重启后不会复原 开启:chkconfigiptables on 关闭:chkconfigiptables off 2) 即时生效,重启后复原 开启 ...

  5. redHat linux 修改防火墙设置简略版

    1) 重启后生效 开启: chkconfig iptables on 关闭: chkconfig iptables off 2) 即时生效,重启后失效 开启: service iptables sta ...

  6. centos7防火墙设置

    前言 CentOS7 与之前版本在防火墙配置上不同,防火墙从iptables变成了firewalld Centos7默认安装了firewalld,如果没有安装的话,可以使用yum命令进行安装 yum ...

  7. Centos6与Centos7防火墙设置与端口开放的方法

    Centos升级到7之后,内置的防火墙已经从iptables变成了firewalld.所以,端口的开启还是要从两种情况来说明的,即iptables和firewalld.更多关于CentOs防火墙的最新 ...

  8. CentOS7——防火墙设置

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

  9. Centos6,Centos7防火墙设置与端口开放的方法

    Centos升级到7之后,内置的防火墙已经从iptables变成了firewalld.端口的开启还是要从两种情况来说明的,即iptables和firewalld. 一.iptables 1.打开/关闭 ...

随机推荐

  1. Yarn源码分析之如何确定作业运行方式Uber or Non-Uber?

    在MRAppMaster中,当MapReduce作业初始化时,它会通过作业状态机JobImpl中InitTransition的transition()方法,进行MapReduce作业初始化相关操作,而 ...

  2. 我的 Android 开发实战经验总结

    我的 Android 开发实战经验总结 字数4440 阅读5137 评论43 喜欢250 曾经一直想写一篇总结 Android 开发经验的文章,预计当时的我还达不到某种水平,所以思路跟不上,下笔又捉襟 ...

  3. jQuery 尺寸 方法

    jQuery 提供多个处理尺寸的重要方法: width() height() innerWidth() innerHeight() outerWidth() outerHeight()

  4. postgresql学习文档

    字符串函数: http://www.php100.com/manual/PostgreSQL8/functions-string.html http://gavin-chen.iteye.com/bl ...

  5. 抒发一下这些天用django做web项目的一些体会

    最近接触了一段时间的python,觉得python写脚本还是挺方便的,做一个简单的桌面应用也很nice,但是随着深入,对python做功能复杂的web项目我彻底死心了​,每个环节都是一堆的坑,部署阶段 ...

  6. point-position2修改版

    说明: 在共面直线测试中,由于计算误差等原因,共面条件判断不准,但计算结果依然正确. // point-position2.cpp : 定义控制台应用程序的入口点. #include "st ...

  7. Apache Nifi 开发

    Apache NiFi是由美国过国家安全局(NSA)贡献给Apache基金会的开源项目.其设计目标是自己主动化系统间的数据流.基于其工作流式的编程理念.NiFi很易于使用,强大.可靠及高可配置. 两个 ...

  8. 如何在shell中处理异常(转)

    似乎好像大概有句话是这么说得,好程序与坏程序之间的区别就在于它的鲁棒性,也就是在异常情况下该程序是否还是在可hold住状态,能否不死,不崩溃,或者不做出一些超出预期的事情.那要做好这些,自然而然就要学 ...

  9. Android 版本更新升级

    推荐一款很好的版本升级开源框架: https://github.com/WVector/AppUpdate 个人地址:总结https://gitee.com/anan9303/AppVersionUp ...

  10. C#安装,启动,停止,卸载Windows服务

    public class OptionServices    {        //安装服务        public static void InstallService(string filep ...