1. Check the firewall status Check the firewall status systemctl status firewalld Start the firewall systemctl start firewalld Disable the firewall systemctl stop firewalld Start the firewall service firewalld start If you cannot open First use: systemctl unmask firewalld.service Then: systemctl start firewalld.service 2. Check the status of open ports Query the open ports netstat -ntulp | grep port number: You can check a specific port number Check whether the specified port is open firewall-cmd --query-port=666/tcp If the prompt is yes, it means it is enabled; if the prompt is no, it means it is not enabled. 3. External development port Check whether the port you want to open is open: firewall-cmd --query-port=6379/tcp Add the specified port to be opened: firewall-cmd --add-port=123/tcp --permanent Reload the added port: firewall-cmd --reload Check whether the specified port is opened successfully: firewall-cmd --query-port=123/tcp Remove the specified port: firewall-cmd --permanent --remove-port=123/tcp Summarize The above is my introduction to checking the firewall status and the status of open ports in Linux. I hope it will be helpful to you! You may also be interested in:
|
<<: Detailed explanation of MySQL cursor concepts and usage
>>: Node.js uses express-fileupload middleware to upload files
Table of contents Example 1 Example 2 Example 3 E...
Table of contents 1. Filter, map, and reduce proc...
Table of contents 1 Background 2 Create a contain...
This article example shares the specific code of ...
A story about database performance During the int...
Operating system: Ubuntu 17.04 64-bit MySQL versi...
We often need to control the hidden, transparent ...
Table of contents Directory Structure bin directo...
This time let’s look at a navigation bar layout w...
Sometimes you need to install certain dependencie...
Main library configuration 1. Configure mysql vim...
Application example website http://www.uhuigou.net...
Correspondence between flutter and css in shadow ...
Recently, I encountered a database with the follo...
Keepalived+Nginx+Tomcat to achieve high availabil...