How to open ports in firewall on Redhat 7

A friend of my helped me with the below command to open the firewall on Redhat 7:

$>firewall-cmd --add-port=8080/tcp --permanent

And redirect from port 80 to port 8080:

$> firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080 --permanent

This is often need if you a running a tomcat server…

Leave a Reply