Home  >  Article  >  Operation and Maintenance  >  What to do if the port cannot be accessed in centos7 system

What to do if the port cannot be accessed in centos7 system

王林
王林Original
2020-03-26 14:09:217428browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn