On OpenSUSE Linux, you can use the firewall-cmd
command to open a port range in the firewall. To open a port range, you will need to specify the protocol (TCP or UDP), the port range, and the zone to which the rule should apply.
For example, to open TCP ports 80 and 443 for a web server in the default zone, you can use the following command:
firewall-cmd --permanent --add-port=80/tcp firewall-cmd --permanent --add-port=443/tcp
To open a range of ports, you can use the --add-port
option followed by the port range and the protocol. For example, to open TCP ports 5000 through 5010, you can use the following command:
firewall-cmd --permanent --add-port=5000-5010/tcp
To apply the changes, you will need to reload the firewall configuration using the following command:
firewall-cmd --reload