1、开关

启动: systemctl start firewalld
查看状态: systemctl status firewalld 
停止: systemctl disable firewalld
禁用: systemctl stop firewalld

查看所有规则:firewall-cmd --list-all

参数--permanent为永久生效 否则重启失效

2.针对端口操作

查看所有打开的端口: firewall-cmd --zone=public --list-ports

添加端口:firewall-cmd --zone=public --add-port=80/tcp --permanent

删删除端口:firewall-cmd --zone=public --remove-port=80/tcp --permanent
 
 
 
3.针对服务操作
 
查看所有放行的服务:firewall-cmd --get-service
添加放行的服务:firewall-cmd --add-service=ftp --permanent
移除服务:firewall-cmd --remove-service=ftp --permanent
 
 
平滑重启:firewall-cmd --reload
 
 

centos7默认防火墙firewalld的更多相关文章

  1. CentOS7 默认防火墙firewalld

    firewalld基础 firewalld是CentOS7源生支持的防火墙,firewalld最大的好处有两个:支持动态更新,不用重启服务:第二个就是加入了防火墙的“zone”概念. firewall ...

  2. CentOS7.3防火墙firewalld简单配置

    今天安装了centos7.3, 想用iptables的save功能保存规则的时候发现跟rhel不一样了,  后来度娘说centos用的是firewalld而不是iptables了, 平时工作都是用re ...

  3. Ubuntu下使用UFW,以及CentOS7的默认防火墙firewalld

    UFW是一个简化版的iptables,基于iptables,配置比iptables简单 默认UFW是关闭状态,即Ubuntu默认打开所有端口,比较危险. 检测状态 ufw status 设置默认状态, ...

  4. Centos7开启防火墙并且使MYSQL外网访问开放3306端口

    http://www.cnblogs.com/kreo/p/4368811.html CentOS7默认防火墙是firewalle,不是iptables #先检查是否安装了iptables servi ...

  5. Centos7启动防火墙时报错Failed to start IPv4 firewall with iptables

    今天在虚拟机的Linux系统(centos7)里安装Redis,准备学习一下布隆过滤器呢,安装完后使用Windows本机访问不了虚拟机里的Redis,telnet不通能够ping通.于是就去看防火墙, ...

  6. linux(centos7)防火墙配置firewalld和iptables

    linux系统中防火墙管理有2种方式,分别是iptables和firewalld(centos7.x),下面介绍centos7的配置方法 一.firewalld: 因为cenos7默认使用firewa ...

  7. centos7的防火墙(firewalld)

    Centos7中默认将原来的防火墙iptables升级为了firewalld,firewalld跟iptables比起来至少有两大好处: 1.firewalld可以动态修改单条规则,而不需要像ipta ...

  8. fedora/centos7防火墙FirewallD详解

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

  9. CentOS7关闭默认防火墙启用iptables防火墙

    CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤. 1.关闭firewall: systemctl stop firewalld.service #停止f ...

随机推荐

  1. 光纤网卡与HBA卡区别

    1.简介 光纤网卡 ,指的是光纤以太网适配器,简称光纤网卡,学名Fiber Ethernet Adapter.传输输的是以太网通信协议,一般通过光纤线缆与光纤以太网交换机连接.按传输速率可以分为100 ...

  2. BZOJ 4804

    辣鸡题目毁我青春 易推 \[\sum_{i=1}^n\sum_{i=1}^m \varphi(gcd(i,j))=\sum_{T}\frac{n}{T}\dfrac{m}{T}\sum_{d|T} \ ...

  3. 百度语音合成AI

    注意:不要使用Dw编辑PHP代码,会因为编码问题出错!!<?php require_once 'AipSpeech.php'; // 你的 APPID AK SK const APP_ID = ...

  4. python学习笔记(4)

    .................................................................................................... ...

  5. GLOG使用Demo

    GLOG使用Demo GLOG是Google开源的一个精简的日志系统,博主简单学习了一下并记录常见用法,以备日常查询 一.安装 照例是编译安装,不过没有使用cmake git clone https: ...

  6. 关于H5的一些杂思细想(一)

    作为一名前端程序媛,虽然整天和代码打交道,但是还是有一颗小清新的内心,虽然有时候加起班来不是人,但是空闲的时候还是会整理一下思绪,顺便整理一下自己,两个多月的加班,一直没有更新,今天就把自己最近做的一 ...

  7. ssh 连接失败 sz rz 安装

    sz 下载命令, rz上传命令的安装 sudo apt-get install lrzsz 1. 检查sshd服务的状态以及端口是否正常, 如下为正常状态 sudo netstat -nlp | gr ...

  8. python多线程和多进程使用

    # 多线程 from concurrent.futures import ThreadPoolExecutor # 多进程 from concurrent.futures import Process ...

  9. MariaDB dos 下连接

    本地 DOS 连接 将文件目录切换到 bin 文件夹下 cd C:\xampp\mysql\bin 输入连接命令 输入 status,查看数据库版本 远程DOS 连接

  10. LeetCode 15 3Sum [sort] <c++>

    LeetCode 15 3Sum [sort] <c++> 给出一个一维数组,找出其中所有和为零的三元组(元素集相同的视作同一个三元组)的集合. C++ 先自己写了一发,虽然过了,但跑了3 ...