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
- How to purchase a dedicated server
- Error connecting to MySQL: Cant connect to MySQL server (10060)
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
- How to restart the Redis service command
- What should I do if the cloud storage space is full (solutions for clearing the cloud storage space)
- How To Install Plesk Panel on Ubuntu 20.04 Server?
- How to change the password of Windows server 2008 server?
- How to modify the remote port in CentOS 7 and 8
- Windows Server system prompts that the account is disabled when accessing shares