Hot Article
- Centos7 closes and restarts the system firewall and opens firewall ports
- How IID server uses Xshell to connect to Linux (centos) server
- BT panel forgets the background login URL, and the solution to the security entrance verification failure
- The php domain name points to ip, how to use the specified ip address to access a server in the url request domain name in curl mode
- Error connecting to MySQL: Cant connect to MySQL server (10060)
- How to purchase a dedicated server
When connecting to the server via SSH, first check whether the firewall is enabled.
View firewall status:
systemctl status firewalld
Seeing the active (running) instruction has been opened
If not, turn on the firewall:
systemctl start firewalld
View all open ports in the firewall:
firewall-cmd --zone=public --list-ports
Open port, for example, I want to open port 8888:
firewall-cmd --zone=public --add-port=8888/tcp --permanent
If you need to close this port:
firewall-cmd --zone=public --remove-port=8888/tcp --permanent
Restart the firewall to make the configuration take effect:
firewall-cmd --reload
If you want to turn off the firewall:
systemctl stop firewalld
Set the startup firewall:
systemctl disable firewalld
related topic
- What should I do if the proxy server link fails to respond?
- How To Install Plesk Panel on Ubuntu 20.04 Server?
- Windows firewall settings only allow specified IPs to access specified ports
- CentOS uses SpeedTest to measure speed
- IID.HK shares some commonly used IT network online detection websites
- How to view file size in linux