How do I add a port to firewall in Linux?

How do I add a port to firewall in Linux?
Answer
Edit firewall rules
  1. Enter the following commands to open the preceding ports: firewall-cmd –zone=public –add-port=25/tcp –permanent. Repeat this command, replacing the port number, for each of the preceding ports.**
  2. List the rules on a given zone by running the following command: firewall-cmd –query-service=
 

Tìm kiếm

Back
Top