Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5789

RFE: Not able to add any description for particular port via "firewall-cmd" command

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • Medium
    • rhel-net-core
    • ssg_networking
    • 15
    • False
    • False
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      Not having any option to add a description for a port added via "firewall-cmd" command.

      Tried to add the description by manually editing the files, but it's getting overwritten while we add the next rule via "firewall-cmd" command.

      This specific request is for adding multiple with a proper description for each of them, which was there in IPtables.

      Version-Release number of selected component (if applicable):

      1. cat /etc/redhat-release
        Red Hat Enterprise Linux Server release 7.4 (Maipo)

      Booted Kernel: 3.10.0-693.11.6.el7.x86_64

      1. rpm -qa firewalld
        firewalld-0.4.4.4-6.el7.noarch

      How reproducible:

      There are no options available to set the "description" together with the command to add port.

      Steps to Reproduce:
      1. Add the port with "--set-description" option:

      ==========================================================

      1. firewall-cmd --permanent --set-description="needed for OSI application" --add-port=3348/tcp
        success
      1. cat /etc/firewalld/zones/public.xml
        <?xml version="1.0" encoding="utf-8"?>
        <zone>
        <short>Public</short>
        <service name="ssh"/>
        <service name="dhcpv6-client"/>
        <port protocol="tcp" port="3348"/> <<-----
        </zone>
        ==========================================================

      Port got added to the "public.xml" file but there are no descriptions.

      2. Tried to add the description manually to the configuration file:

      ======================================================

      1. cat /etc/firewalld/zones/public.xml
        <?xml version="1.0" encoding="utf-8"?>
        <zone>
        <short>Public</short>
        <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
        <service name="ssh"/>
        <service name="dhcpv6-client"/>
        <port protocol="tcp" port="3523"/> # needed for OSI application <<<---------
        </zone>
      1. firewall-cmd --permanent --add-port=3344/tcp
        success
      1. cat /etc/firewalld/zones/public.xml
        <?xml version="1.0" encoding="utf-8"?>
        <zone>
        <short>Public</short>
        <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
        <service name="ssh"/>
        <service name="dhcpv6-client"/>
        <port protocol="tcp" port="3523"/>
        <port protocol="tcp" port="3344"/>
        </zone>
        ======================================================

      Actual results:

      There is no description being set for any of the ports with "--set-description" option.

      Expected results:

      There should be some option to set a description for each port as per the user requirement.

      Additional info:

      We do have the option to set the description for particular service, zones, helper, ipset, icmptype which would be added to the corresponding ".xml" files.

              egarver Eric Garver
              ndev_redhat ndev@redhat.com (Inactive)
              Eric Garver Eric Garver
              qe-baseos-daemons qe-baseos-daemons
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: