How to open ports to the outside world in Alibaba Cloud Centos7.X

How to open ports to the outside world in Alibaba Cloud Centos7.X

In a word: if you buy a cloud server from any major manufacturer, just go to the security group and configure the corresponding ports you need to use!

Because the blogger uses Alibaba Cloud, here I will only introduce how to open ports on Alibaba Cloud. Just follow the three pictures below.

At this time, some students said, is it okay not to use the platform? I want to exercise my Linux ability... Of course, I will introduce how to configure firewall rules directly on Linux to open ports (Centos7 and above, the firewall rules used by Centos6 and 7 are different, Centos6 is not introduced here)

First master systemctl+firewall command

describe Order
Check the firewall status systemctl status firewalld.service
Start firewall systemctl start firewalld
Stop the firewall systemctl stop firewalld
Start firewall at boot systemctl enable firewalld
Disable firewall at startup systemctl disable firewalld
Learn more about systemctl command^_^
Check whether the service is started systemctl is-enabled firewalld.service
View the list of started services systemctl list-unit-files|grep enabled
View the list of services that failed to start systemctl --failed

Secondly, master firewall-cmd command

describe Order
View all firewall information firewall-cmd --list-all
View open ports firewall-cmd --list-ports
Update firewall rules firewall-cmd --reload
Open Ports firewall-cmd --zone=public --add-port=3000/tcp --permanent
Closing a Port firewall-cmd --zone=public --remove-port=3000/tcp --permanent

Final execution steps:

  1. First check whether the firewall is turned on: systemctl status firewalld.service
  2. Open the port (rules need to be updated to take effect after opening): firewall-cmd --zone=public --add-port=3000/tcp --permanent
  3. Update firewall rules: firewall-cmd --reload

This is the end of this article about how to open ports to the outside world in Alibaba Cloud Centos7.X. For more information about how to open ports to the outside world in Alibaba Cloud Centos7.X, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to install Python 3.6 on Alibaba Cloud CentOS 7.4
  • Alibaba Cloud CentOS 7 Server Build Nginx Web Service Experience Example
  • Tutorial on installing and configuring MySql5.7 in Alibaba Cloud ECS centos6.8
  • Tutorial on installing and configuring Tomcat on Alibaba Cloud Server and adding external network access ports

<<:  Detailed example of using if statement in mysql stored procedure

>>:  Detailed explanation of the parsererror error case in JavaScript solution in ajax

Recommend

Solution to Vue data assignment problem

Let me summarize a problem that I have encountere...

Detailed explanation of nginx-naxsi whitelist rules

Whitelist rule syntax: BasicRule wl:ID [negative]...

How to set up jar application startup on CentOS7

Pitfalls encountered during project deployment Wh...

Java+Tomcat environment deployment and installation process diagram

Next, I will install Java+Tomcat on Centos7. Ther...

Detailed explanation of commonly used CSS styles (layout)

Compatible with new CSS3 properties In CSS3, we c...

Share the responsive frameworks commonly used by web design masters (summary)

This article introduces and shares the responsive...

jQuery implements breathing carousel

This article shares the specific code of jQuery t...

Detailed explanation of the implementation of nginx process lock

Table of contents 1. The role of nginx process lo...

How to quickly build a LAMP environment on CentOS platform

This article uses an example to describe how to q...

MySQL trigger syntax and application examples

This article uses examples to illustrate the synt...

Font Treasure House 50 exquisite free English font resources Part 2

Designers have their own font library, which allo...

Detailed tutorial on installation and configuration of nginx under Centos7

Note: The basic directory path for software insta...

A brief discussion on the solution of Tomcat garbled code and port occupation

Tomcat server is a free and open source Web appli...

The main differences between MySQL 4.1/5.0/5.1/5.5/5.6

Some command differences between versions: show i...