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
- How to do if phpstudy port 80 is occupied (perfect solution)
- Windows firewall settings only allow specified IPs to access specified ports
- What should I do if I lose connection to the game server of Legend M international service? (Detailed solution)
- How to restart the Redis service command
- How to change the password of Windows server 2008 server?
- How to modify the remote port in CentOS 7 and 8