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. 24模拟keepalved vrrp功能,监听主节点,如果主节点不可访问则备节点启动并配置LVS实现接管主节点的资源提供服务(提醒:注意ARP缓存)

    [root@lb04 scripts]# cat ha_lv.sh #!/bin/bash while true do check_count=$(nmap 10.0.0.13|grep " ...

  2. ThinkPHP -- 问题

    @.nginx下,找不到页面,如果然nginx支持pathinfo模式 原文:http://www.leixuesong.cn/1418 把文章的配置拷贝了下.

  3. js保留几位小数

    function reservedDecimal(val, digit) { return Number(val).toFixed(digit);} 调用 reservedDecimal(10,2); ...

  4. centos7 笔记本盒盖不睡眠

    cd /etc/systemd vi logind.conf 动作包括:HandlePowerKey:按下电源键后的动作HandleSleepKey:按下挂起键后的动作HandleHibernateK ...

  5. ios -解决view遮挡按钮问题

    #pragma mark -解决view遮挡按钮问题 //分享按钮赋予 self 最顶部 / web按钮赋予 self 最顶部 / showBtn显示按钮 self 最顶部 / scrollviews ...

  6. CodeIgniter 入门教程第一篇:信息发布

    一.MVC CodeIgniter 采用MVC架构即:控制层.模型层和视图层. 对应Application下面的文件夹   (图1): 所有新建文件以.php结尾 视图层 view 文件夹放入HTML ...

  7. TP数据查询

    [数据查询] select()是数据模型的一个指定方法,可以获得数据表的数据信息 返回一个二维数组信息,当前数据表的全部数据信息 $obj = D();  创建对象 $obj -> select ...

  8. Java Modifier

  9. SSL证书的生成

    openssl工具下载路径:链接:https://pan.baidu.com/s/1o0-s8OplHZt55Cio2HmjVA 密码:u759 1.使用openssl工具生成一个RSA秘钥      ...

  10. Java格式化日期的三种方式

    1)借助DateFormat类: public String toString(Date d) { SimpleDateFormat sdf = new SimpleDateFormat(“yyyy- ...