How to add a port to a service in firewalld

This post shows how to add port 5000 into filrewalld for Oracle Autonomous Health Framework (AHF) running on GI/RAC.

  1. List existing services:
    # firewall-cmd –get-services
  2. Add the port: If the service you want to modify already exists, use the following command to add the port: 

    # firewall-cmd –permanent –add-port=<port>/<protocol> –service=<service-name>
    eg.

    #firewall-cmd –permanent –add-port=5000/tcp –service=oracle_rac
  3. Reload firewalld: After making changes, reload firewalld to apply the new configuration:

    # firewall-cmd –reload
  4. Check the port added into service:

    # firewall-cmd –info-service=oracle_rac
    oracle_rac
    ports: 1521/tcp 5000/tcp
    protocols:
    source-ports:
    modules:
    destination:
    includes:
    helpers:

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.