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

CSS modular solution

There are probably as many modular solutions for ...

Detailed explanation of Object.create instance usage in js

1. Create a new object using the Object.create() ...

Full-screen drag upload component based on Vue3

This article mainly introduces the full-screen dr...

Vue2.x - Example of using anti-shake and throttling

Table of contents utils: Use in vue: explain: Ima...

JavaScript navigator.userAgent obtains browser information case explanation

The browser is probably the most familiar tool fo...

Implementation of webpack-dev-server to build a local server

Table of contents Preface webpack-deb-server webp...

Detailed explanation of React setState data update mechanism

Table of contents Why use setState Usage of setSt...

mysql5.7 remote access settings

Setting up remote access in mysql5.7 is not like ...

JavaScript to implement mobile signature function

This article shares the specific code of JavaScri...

CentOS7 installation zabbix 4.0 tutorial (illustration and text)

Disable SeLinux setenforce 0 Permanently closed: ...

A brief discussion on mobile terminal adaptation

Preface The writing of front-end code can never e...

Flame animation implemented with CSS3

Achieve results Implementation Code html <div ...

MySQL 5.7.23 decompression version installation tutorial with pictures and text

Download the MySQL installer Official download ad...