Alibaba Cloud server port access failed
The project is deployed on a new Alibaba Cloud server. After adding the security group port, the solution is still inaccessible.
Open the local cmd, telnet IP+port to check whether the port can be connected
# firewall-cmd --list-all #查看防火墙开放的端口
Add port
# firewall-cmd --zone=public --add-port=18002/tcp --permanent
Restart firewall
#firewall-cmd --reload
Some firewall commands
1: View the fire protection status
systemctl status firewalld
service iptables status
2: temporarily turn off the firewall
systemctl stop firewalld
service iptables stop
3: permanently turn off the firewall
systemctl disable firewalld
chkconfig iptables off
4: Restart the firewall
systemctl enable firewalld
service iptables restart
5: Start the firewall
sudo systemctl start firewalld