首页 > 其他分享 >firewall

firewall

时间:2023-11-26 19:25:46浏览次数:28  
标签:zone firewall cmd 端口 防火墙 --

目录

工具firewall-cmd,该工具是Linux提供的专门用来操作firewall的。

选项 说明
--permanent 表示设置为永久生效,如果不设置此参数,重启服务后失效
--add-port 表示添加指定端口,格式为:端口/通讯协议
--remove-port 表示移除指定端口
--zone 作用域

开放端口

firewall-cmd --zone=public --add-port=8089/tcp --permanent

批量添加开放端口

firewall-cmd --zone=public --add-port=9001-9003/tcp --permanent

关闭端口

firewall-cmd --zone=public --remove-port=5672/tcp --permanent

重新加载防火墙配置

#配置立即生效
firewall-cmd --reload

查询防火墙中指定的端口是否开放

firewall-cmd --query-port=9001/tcp

查询开启的端口列表

firewall-cmd --zone=public --list-ports

查看当前系统默认的作用区域

firewall-cmd --get-default-zone

列出当前开启的服务列表

firewall-cmd --list-services

重启防火墙

firewall-cmd --reload

关闭防火墙

systemctl stop firewalld.service

查看防火墙状态

firewall-cmd --state #查看防火墙状态

标签:zone,firewall,cmd,端口,防火墙,--
From: https://www.cnblogs.com/leizia/p/17857727.html

相关文章

  • firewalld与iptables区别
    ComparisonofFirewalldtosystem-config-firewallandiptablesTheessentialdifferencebetweenfirewalldandiptablesserviceare:Theiptablesservicestoresconfigurationin/etc/sysconfig/iptableswhilefirewalldstoresitinvariousXMLfilesin/u......
  • 什么是 WAF - Web Application Firewall
    在我们深入探讨网络安全领域的多种技术和工具之前,让我们先理解一下"WAF"。WAF是WebApplicationFirewall(网络应用防火墙)的缩写,它是一种保护web应用的特殊防火墙。WAF旨在过滤、监控和阻止来自所有HTTP流量的恶意攻击。与传统的网络防火墙不同,WAF专注于应用层保护,可以识......
  • systemctl mask firewalld
    systemctlmaskfirewalldsystemctl--helpmaskNAME...MaskoneormoreunitsunmaskNAME...Unmaskoneormoreunits[root@hecs-98663~]#systemctlstatusfirewalld●firewalld.service-firewalld-dynamicfirewall......
  • CentOS 7.9 防火墙启动报错--Process: 12848 ExecStart=/usr/sbin/firewalld --nofork
    原因:配置防火墙策略过程中,多次启停防火墙,导致防火墙启动报错报错截图: 排查:python版本是一致的,有一个遗留的防火墙进程防火墙正常关闭后没有这个进程 解决办法:杀掉这个进程,启动防火墙  ......
  • FIREWALL 配置
    配置流程1)接口配置IP地址interfaceg1/0/0ipaddress10.1.1.124interfaceg1/0/1ipaddress20.1.1.1242)配置trustfirewallzonetrustsetpriority85addinterfaceGigabitEthernet1/0/13)配置untrustfirewallzoneuntrustsetpriority5addinterfaceGigabitEtherne......
  • CentOS7中firewall防火墙详解和配置
    提示修改防火墙配置文件之前,需要对之前防火墙做好备份重启防火墙后,需要确认防火墙状态和防火墙规则是否加载,若重启失败或规则加载失败,则所有请求都会被防火墙拒绝firewalld的基本使用#停止firewallsystemctlstopfirewalld.service#禁止firewall开机启动systemctldisablefi......
  • 安防视频监控平台EasyCVR服务器需要开启firewall防火墙,该如何开放端口?
    智能视频监控/视频云存储/集中存储/视频汇聚平台EasyCVR具备视频融合汇聚能力,作为安防视频监控综合管理平台,它支持多协议接入、多格式视频流分发,视频监控综合管理平台EasyCVR支持海量视频汇聚管理,可应用在多样化的场景上,包括城市“一网统管”建设、智慧工地风险预警、智慧工厂安全......
  • kylin-verver firewalld 防火墙配置
    1.查看firewalld状态systemctlstatusfirewalldsystemctlstatusfirewalld.servicesystemctlis-activefirewalld2.firewalld服务开启:systemctlstartfirewalld关闭:systemctlstopfirewalld重启:systemctlrestartfirewalld3.开机自启systemctl......
  • 如何在 CentOS 7/8 上使用 FirewallD 设置防火墙
    FirewallD是一种防火墙管理解决方案,可用于许多Linux发行版,它充当Linux内核提供的iptables数据包过滤系统的前端。RHEL及其衍生发行版,自版本7起即使用FirewallD替代iptables。防火墙中的基本概念在我们开始讨论如何实际使用该实用程序来管理防火墙配置之前,我们应该熟悉该工具......
  • centos防火墙 firewall
    CentOS7开放/关闭端口,关闭防火墙一、永久的开放需要的端口sudofirewall-cmd--zone=public--add-port=3000/tcp--permanentsudofirewall-cmd--reload二、永久关闭某端口$sudofirewall-cmd--remove-port=3000/tcp--permanent二、检查防火墙规则firewall-cmd--......