1.14. Configuring zone priorities for traffic classification by using firewalld


With zone priorities, you can control the packet classification order by specifying priorities for ingress and egress traffic. The benefit is that you can specify the traffic classification order in a zone.

So zone A may be considered before zone B regardless of the source address or interfaces. A zone of a lower priority value has higher precedence over a zone with a higher priority value. This classification has a pair of ingress priority value and egress priority value.

1.14.1. Setting same priority value for both traffic types in a zone

By using the --set-priority option, you can set a common value for both ingress and egress traffic classification without explicit specification.

Prerequisites

  1. Create a new zone:

    # firewall-cmd --permanent --new-zone=example-zone
  2. Set a common zone priority value for the example-zone zone with --set-priority:

    # firewall-cmd --permanent --zone example-zone --set-priority -10

    By setting a lower value ensures the higher precedence. This ensures that all configured operations for both traffic types in this zone will take precedence over operations from other zones.

  3. Apply permanent configuration to runtime:

    # firewall-cmd --reload

Verification

  • Display the priority value for both traffic types:

    # firewall-cmd --permanent --info-zone example-zone
    
    example-zone
      target: default
      ingress-priority: -10
      egress-priority: -10
      ...
      icmp-block-inversion: no
      ...
      services: dhcpv6-client mdns samba-client ssh
      ...
      forward: yes
      masquerade: no
      ...

    This setting ensures that the traffic will be considered for classification into the example-zone before other zones.

1.14.2. Setting different priority value for each traffic type in a zone

By setting distinct values for ingress and egress traffic, you can set priorities for the traffic classification in a zone.

Procedure

  1. Create a new zone:

    # firewall-cmd --permanent --new-zone=example-zone
  2. Set a zone priority value for ingress traffic in the example-zone zone with --set-ingress-priority:

    # firewall-cmd --permanent --zone example-zone --set-ingress-priority -10
  3. Set a zone priority value for egress traffic in the example-zone zone with --set-egress-priority:

    # firewall-cmd --permanent --zone example-zone --set-egress-priority 100
  4. Apply permanent configuration to runtime:

    # firewall-cmd --reload

Verification

  • Display the priority value for both traffic types:

    # firewall-cmd --permanent --info-zone example-zone
    
    example-zone (active)
      target: default
      ingress-priority: -10
      egress-priority: 100
      icmp-block-inversion: no
      interfaces: eth0
      ...
      services: dhcpv6-client mdns samba-client ssh
      ...
      forward: yes
      masquerade: no
      ...

    These values indicate that the ingress traffic has priority over the egress traffic in the example-zone zone before other zones.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동