Besides whatever firewall you run on an EC2 instance (which you REALLY NEED TO BE DOING!!), AWS puts a “security group” in front of it as well. This is a group of firewall rules that control what the outside world can reach on your server.

Editing security groups

  1. Go to AWS Console ⇒ EC2 ⇒ Instances
  2. Select the instance you want to edit
  3. In the “Security” tab, find the “Security Groups” option
  4. Click on the group. You should land on a page titled “Edit inbound rules.”
  5. Add inbound port forwards as needed:
    1. Select the connection type from the Type dropdown. If what you want isn’t there, select either “Custom UDP” or “Custom TCP.”
  6. Click Save