How does the Centos system check which ports are opened by the firewall? How to open and add a certain port?

How does the Centos system check which ports are opened by the firewall?

Just use the following command:

firewall-cmd --list-ports

If you want to add a port, you can use the following two commands:

firewall-cmd --add-port=465/tcp --permanent
firewall-cmd --reload

Guess you like

Origin blog.csdn.net/wenhao_ir/article/details/130947256