How to open port 8080 on Alibaba Cloud ECS server

How to open port 8080 on Alibaba Cloud ECS server

For security reasons, Alibaba Cloud Server ECS comes with its own security group by default (only ports 22 and 3389 are open). The default port number of Tomcat is 8080, so it is not possible to use Tomcat without opening port 8080. Many users tried to open port 8080 by modifying iptables, but failed. This was due to the security group, Alibaba Cloud's unchanging security group open port problem. Without further ado, let’s talk about how to open port 8080 on Alibaba Cloud Server ECS!

Note: To open ports on Alibaba Cloud servers, you must first configure a security group. If you have enabled the server's internal firewall, you also need to modify iptables. There is a tutorial on how to configure security groups in the official website documentation (Adding Security Group Rules - Alibaba Cloud). You can refer to the documentation or this article. Let's start with the tutorial:

Alibaba Cloud opens port 8080

When using Alibaba Cloud Server, you must always remember that there is such a thing as security group. To open port 8080, you need to configure a security group.

1. Enter the ECS cloud server console

2. First find the target instance that needs to be operated, click "More"--"Network and Security Group"--"Security Group Configuration"
As shown in the following figure:

3. Click "Configure Rules"

4. Click "Add Security Group Rule" and add port 8080, as shown below:

Port range: 8080/8080
Authorization object: 0.0.0.0/0

At this point, the tutorial on opening port 8080 in the security group is complete. You can also refer to the official document: Add security group rules - Alibaba Cloud

Modify iptables to allow port 8080

Modify iptables. If you have not enabled the ECS internal firewall, you can ignore this step. If your server has not enabled the internal firewall, you can ignore this step. This article is for Linux server systems. How do you check whether the server has enabled the internal firewall? Execute the command: service iptables status, as shown below:

[root@aliyunbaike ~]# service iptables status
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.

The above command execution results show that the server does not have an internal firewall enabled. If the internal firewall is turned on, open the port number tutorial:
Take Linux server as an example:

1. SSH to Alibaba Cloud server: ssh root@your server IP
2. Enter the directory: cd /etc/sysconfig
3. Modify the iptables command: vi iptables
4. Add one more:

-A INPUT -m state –state NEW -m tcp -p tcp –dport 8080 -j ACCEPT

Just save it.

5. Restart iptables: service iptables restart

To open other ports such as 3306, 80, 8888, 443, etc., follow the above tutorial. In addition, fill in the authorization object: 0.0.0.0/0 means that everyone is authorized, which has poor security. You can configure it according to actual needs. Many users do not understand security groups. This is a security mechanism (Official explanation of security groups - Alibaba Cloud). The documentation has clearly explained it, including the configuration and application cases of security groups.

This is the end of this article about how to open port 8080 on Alibaba Cloud ECS. For more information about opening port 8080 on Alibaba Cloud ECS, 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:
  • Alibaba Cloud ECS Server Getting Started Process (Must-Read Tutorial for Newbies)
  • How to set the user root password and remote connection method for Alibaba Cloud ECS instance
  • How to deploy Django on Alibaba Cloud ECS server
  • Alibaba Cloud ECS cloud server (linux system) cannot connect remotely after installing MySQL (pitfall)
  • Alibaba Cloud ECS CPU 100% Troubleshooting Analysis

<<:  MySQL Best Practices: Basic Types of Partition Tables

>>:  Detailed explanation of this reference and custom properties in JavaScript

Recommend

Common usage of regular expressions in Mysql

Common usage of Regexp in Mysql Fuzzy matching, c...

MySQL Basic Tutorial: Detailed Explanation of DML Statements

Table of contents DML statements 1. Insert record...

Sample code for implementing rolling updates of services using Docker Swarm

1. What is Docker Swarm? Docker Swarm is a cluste...

Vue implements partial refresh of the page (router-view page refresh)

Using provide+inject combination in Vue First you...

The use of setState in React and the use of synchronous and asynchronous

In react, if you modify the state directly using ...

Vue component organization structure and component registration details

Table of contents 1. Component Organization 2. Co...

Detailed explanation of the implementation of MySQL auto-increment primary key

Table of contents 1. Where is the self-incremente...

Detailed explanation of SSH password-free login configuration under Linux

Assume there are two Linux servers A and B, and w...

Example code of CSS layout at both ends (using parent's negative margin)

Recently, during the development process, I encou...

Install and build a server environment of PHP+Apache+MySQL on CentOS

Yum (full name Yellow dog Updater, Modified) is a...

Learn about CSS label display mode in one article

Tag type (display mode) HTML tags are generally d...

JavaScript implements single linked list process analysis

Preface: To store multiple elements, arrays are t...

How to disable web page styles using Firefox's web developer

Prerequisite: The web developer plugin has been in...

Detailed tutorial on integrating Apache Tomcat with IDEA editor

1. Download the tomcat compressed package from th...