打开1000端口示例:

查看接口所属区域

$ firewall-cmd –get-zone-of-interface=wlp4s0
public

在public上开启端口10000/tcp

$ firewall-cmd –permanent –zone=public –add-port=10000/tcp

success

重新载入并查看规则

$ firewall-cmd –reload
success

$ firewall-cmd –zone=public –list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: wlp4s0
  sources:
  services: ssh dhcpv6-client ipp-client mdns ipp
  ports: 12694/tcp 12694/udp 10000/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注