Ali cloud open a lightweight server port number

You know, the server port number default is not open. This time we visit the project or access remote access software is invisible. So we have to open the port number.

1, Ali cloud console add firewall rules

    1) enter the server console interface, click the Firewall

 

    2) Click on Add Rule, enter the corresponding port number

 

2, in the Linux open port numbers in server

  • By systemctl status firewalld view FirewalID state, found that the current state is dead, that the firewall is not turned on.

  • Open the firewall by systemctl start firewalld, without any prompting open successfully.

  • Performing firewall-cmd --permanent --zone = public --add-port = port number / protocol --permanent. That success prompted success

    举例:firewall-cmd --permanent --zone=public --add-port=3306/tcp--permanent

        (-Permanent is permanent, this argument does not restart after failure)

  • Execution firewall-cmd --reload, suggesting success that is success. Or turn off the firewall: systemctl stop firewalld

 

 

After the above two-step configuration, you can access the port of

 

Published 43 original articles · won praise 17 · views 10000 +

Guess you like

Origin blog.csdn.net/Hitmi_/article/details/104079413