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

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

王林
Release: 2020-03-26 14:09:21
Original
7560 people have browsed it

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
Copy after login

2. Open the port

firewall-cmd --zone=public --add-port=8080/tcp --permanent
Copy after login

3. Reload the configuration file

firewall-cmd --reload
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template