Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to open a port on AWS EC2's Linux server

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to open a port on AWS EC2's Linux server". It is easy to understand and well-organized. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to open a port on AWS EC2's Linux server".

AWS, or Amazon Web Services, is not a new term in the IT world. It is a cloud service platform provided by Amazon. Its free account can provide you with a limited free service for a year. This is one of the ways to try new technologies without spending money.

AWS provides server computing as one of their services, which they call EC (flexible Computing). Use it to build our Linux server. We have seen how to set up a free Linux server on AWS.

By default, all EC2-based Linux servers only open port 22, the SSH service port (which allows inbound connections to all IP). Therefore, if you host a service on any particular port, open the port on the AWS firewall for your server.

Similarly, its ports from 1 to 65535 are open (for all outbound traffic). If you want to change this, you can use the following method to edit the outbound rule.

It's easy to set firewall rules for your server on AWS. You can open the port for your server in a few seconds. I will show you how to open the port of the EC2 server with a screenshot.

Step 1:

Log in to the AWS account and enter the EC2 Management console. Enter the security group Security Groups under the "Network and Security" Network & Security menu, and highlight as follows:

AWS EC2 Management console

Step 2:

Select your EC2 server in the security group Security Groups and select Edit inbound rule Edit inbound rules under the Action Actions menu.

AWS inbound rules menu

Step 3:

Now you will see the inbound rules window. You can add / edit / delete inbound rules here. There are several such as http, nfs and so on listed in the drop-down menu, they can automatically fill the port for you. If you have a custom service and port, you can also define it.

AWS add inbound rules

For example, if you want to open port 80, you need to choose:

Type: http

Protocol: TCP

Port range: 80

Source: any source: open port 80 to accept requests from "any IP (0.0.0.0 IP 0)"; my IP: then it will automatically populate your current public Internet IP

Step 4:

That's it. After saving, your server inbound port 80 will open! You can verify this through port 80 of the public domain name from telnet to the EC2 server (you can find it in the EC2 server details).

You can also check it out on websites such as ping.eu.

Outbound rules can be edited in the same way, and these changes take effect immediately.

The above is all the contents of the article "how to open a port on AWS EC2's Linux server". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report