Home >Operation and Maintenance >CentOS >What to do if the port cannot be accessed in centos7 system
Problem:
centos7.3 system, firewalld has been closed, but except for port 22, the other ports cannot be accessed by the outside world, and local access is normal.
Solution steps:
(Recommended tutorial: centos tutorial)
1. First open
firewalld:systemctl start firewalld
2. Open the port
firewall-cmd --zone=public --add-port=8080/tcp --permanent
3. Reload the configuration file
firewall-cmd --reload
At this time, the port can be accessed after testing. If the firewall is not needed, it can be closed again. The open port will not be affected.
Note: Firewall depends on the native python version. If you upgrade the python version, you need to modify the firewall configuration file.
Recommended related video tutorials: linux video tutorial
The above is the detailed content of What to do if the port cannot be accessed in centos7 system. For more information, please follow other related articles on the PHP Chinese website!