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
- What to do if a cp: omitting directory error occurs in Linux (detailed solution)
- How to confirm whether the ip is blocked or polluted?
- How to change pycharm to Chinese (pycharm set Chinese detailed tutorial)
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 does CentOS7 open/view ports?
- What to do if a cp: omitting directory error occurs in Linux (detailed solution)
- What to do if the server is compromised (2023 detailed solution)
- IDGlobal teaches you to disable ICMP protocol on CentOS
- How to view user login logs in the IID server Linux system?
- How to fix 403forbidden (detailed solution)