Below comnand can be used.
sudo firewall-cmd --add-port=<port>/tcp --permanent
Replace the port with the port number to which you want to open firewall. You can replace the tcp protocol as well with the protocol to which you want to open the firewall.
You will see success in output as follows when above command is executed successfully.
sudo firewall-cmd --add-port=8091/tcp --permanent
success
You check if the firewall port is opened you can execute below command.
sudo firewall-cmd --list-all
Products to which Article Applies
All Linux Operating Systems
Search Keywords: firewall how to add adding open opening port ports specific particular command commands permission permissions give giving
Article Author: Tarun Boyella
No comments:
Post a Comment