How to create and modify custom .xml file under /etc/firewalld/services for adding certain ports with firewalld in RHEL 7, 8, 9?

Solution Verified - Updated -

Issue

  • FirewallD: Custom xml under /etc/firewalld/services is not adding ports.
  • How to modify custom created .xml service in firewalld ?
  • How to add multiple ports as a service to a particular zone in firewalld ?
  • Enable multiple ports ports for a specific zone in firewalld.

Environment

  • Red Hat Enterprise Linux 7, 8, 9
  • Firewalld.

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