Opening individual port works but not port range on FirewallD

MarcLaf

If I open an individual port on a zone using FirewallD and query the port it comes back with yes (allowed).

firewall-cmd --zone=zonename --add-port=6005/tcp
firewall-cmd --zone=zonename --query-port=6005/tcp
yes

If I open a port range and run a query on a port within that range, it comes back with no (blocked).

firewall-cmd --zone=zonename --add-port=6000-6010/tcp
firewall-cmd --zone=zonename --query-port=6005/tcp
no

Is this normal behaviour or am I not doing something correctly? (These rules are also added using --permanent and I do issue a reload after each change).

MarcLaf

From RHEL support, this is by design. You need to query the whole port range to get "yes". Querying for individual ports within the range is not supported.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TOP Ranking

HotTag

Archive