查看当前的防火墙规则:

[root@wpsyz-server-01 biiuser]# firewall-cmd --list-all
public                           #有一个公用防火墙区域 “public”
  target: default                #该区域下设置的默认目标是系统默认
  icmp-block-inversion: no       #icmp-block-inversion 属性表示是否启用反转 ICMP 阻塞规则,这里没有开启
  interfaces:                    #interfaces 和 sources 属性分别表示防火墙区域的可用接口和来源地址。该例中没有设置可用的接口和来源地址。
  sources:
  services: dhcpv6-client ssh    #services 属性表示预定义的服务名,可以通过 firewall-cmd --get-services 命令查询到。该例中允许 dhcpv6-client 和 ssh 这两种服务。
  ports:                         #ports 属性表示开放的端口
  protocols:                     #protocols 表示开放的协议
  masquerade: no                 #masquerade 属性用于开启网络地址转换(NAT),使得内网主机可以访问外网
  forward-ports:                 #forward-ports 属性指定端口转发规则
  source-ports:                  #source-ports 属性指定源端口
  icmp-blocks:                   #icmp-blocks 属性表示禁止 ICMP 协议访问的类型
  rich rules:                    #rich rules 属性表示自定义的高级防火墙规则

 重新加载firewalld配置:

firewall-cmd --reload

 

posted on 2023-06-07 13:44  属于我的梦,明明还在  阅读(100)  评论(0)    收藏  举报