Open ports 8000 and 3000 on EC2 AWS instance

Viewed 449

I am trying to run Django in port 8000 and React in port 3000 on an EC2 AWS instance. I first created the inbound rules for ports 8000 and 3000:

enter image description here

Then, I start both Django and React on ip 0.0.0.0:

  • React:

    package.json

    {
    ...
      "scripts": {
        "start": "HOST=0.0.0.0 react-scripts start",
        ...
       },
    }
    

    sudo npm start

  • Django:

    sudo python manage.py runserver 0.0.0.0:8000

And I can check both ports are open and listening:

sudo lsof -i -P -n | grep LISTEN

enter image description here

However, when I try to reach the urls http://external_ip:8000/ or http://external_ip:3000/ Nothing is working. However, I can make Django server works if I change 8000 by 80.

What am I doing wrong or missing?

0 Answers
Related