Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
If a port is opened and run --query-port, it shows Yes. But if I open a port range and query a port within that range, it shows No.
Version-Release number of selected component (if applicable):
- All RHEL 7 versions
- firewalld package
How reproducible:
Add a port range in firewalld using --add-port option and query a port within that range using --query-port. The output shows No
Steps to Reproduce:
1.# firewall-cmd --add-port=8080/tcp; firewall-cmd --add-port=825-830/tcp
2.firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client ssh
ports: 8080/tcp 825-830/tcp
protocols:
masquerade: no
forward-ports:
sourceports:
icmp-blocks:
rich rules:
3.
Actual results:
# firewall-cmd --query-port=830/tcp
no
# firewall-cmd --query-port=829/tcp
no
# firewall-cmd --query-port=8080/tcp
yes
Expected results:
# firewall-cmd --query-port=830/tcp
yes
# firewall-cmd --query-port=829/tcp
yes
# firewall-cmd --query-port=8080/tcp
yes
Additional info:
moving to rhel8 as a bug report, ports within a range are correctly reported as present, but that does not apply for subranges.
firewalld-0.7.0-5.el8.noarch
last line should be also 'yes'
for port in 3199 3200 3250 3299 3300 3200-3300 3250-3260 ; do echo -ne "port $port/tcp:\t"; firewall-cmd --query-port $port/tcp; done
port 3199/tcp: no
port 3200/tcp: yes
port 3250/tcp: yes
port 3299/tcp: yes
port 3300/tcp: yes
port 3200-3300/tcp: yes
port 3250-3260/tcp: no
(In reply to Tomas Dolezal from comment #7)
> port 3200-3300/tcp: yes
this port range was defined before the output in previous comment
# firewall-cmd --list-ports
3200-3300/tcp
Upstream:
fae2b48a5880 ("test: regression/rhbz1404076: enhance to include sub ranges")
f12e1587433c ("fix: source_port: support querying sub ranges")
6c0b07ad482d ("fix: port: support querying sub ranges")
cd8e0c3774a6 ("improvement: port: simplify queryPort")
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (firewalld bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:4461