Week 8— Opening a Port

Let’s Fix the Issue Spotted in the Previous Story!

Jooyoung Oh
Oct 31, 2021

Alright. Last time, we tried to access our website through the following address, which we thought would work seamlessly:

http://[Your IP Address]:5000/

In order for this address to work, we need to do further settings beforehand. Now, go to your AWS. Here, we will open up a 5000 port from the AWS EC2 Security Group.

First, Enter the EC2 Control Console and then the “Security Group” section.

Then, select the respective security group.

Select “Edit Inbound Rules.”

Here, add three ports:

  • 80: basic port for accessing HTTP
  • 5000: basic FLASK port
  • 27017: for accessing MongoDB from outside

Now, try again by entering the following address:

http://[Your IP Address]:5000/

Now, all we have to do is edit the app.py file and upload!

Fin.

Unlisted

--

--

Jooyoung Oh

After graduating from a high school in Al Khobar, Saudi Arabia, I'm currently spending my gap year exploring the world beyond the wall, behind the screen.