Reputation: 11
As I read about AWS security groups, we must open outbound ports to initiate traffic from within instance. What if I have to access a website or download some packages (using yum) over HTTP? Do I need to open any specific ports for this? As I understand for HTTP/HTTPS client uses random ports to make a socket connection so in that case should I open all ports?
Upvotes: 1
Views: 767
Reputation: 36073
In order to make connections from your EC2 instance to the internet, you must open outbound ports in your security group.
The port number you need to open is the destination port, not the source port(s).
Some examples:
If the web servers you're connecting to are listening on different ports (aside from 80 or 443), then you need to change or add more rules accordingly.
Upvotes: 3