How to display the TCP/UDP port number for a firewalld service

Solution Verified - Updated -

Issue

  • Opening network ports with firewalld is simplified by the use of service names. For example:

    # firewall-cmd --add-service=high-availability --permanent
    
  • Which port number(s) are associated with service names?

Environment

  • Red Hat Enterprise Linux (RHEL)
    • 7
    • 8
    • 9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content