Security group outbound rules with Elastic Container Service

0

Hi, i've got an ECS Fargate service with tasks on personal VPC behind an App load balancer. All works great but i'm not confident with the security group outbound rules i set and i don't know which range of TCP ports need to be really open. At the moment all TCP ports are open on outbounds rules and if i change this, deployment doesn't work. I want to know which ports are really needed to make my ECR image to be automatically deployed on tasks.
I spend a little bit of time searching on the internet but responses don't work for me. I read some persons with 32000-65000+ tcp ports open but seems a litlle bit the same as all TCP ports for me.

I try this setup : HTTP 80 (LB) , TCP 3001 (my app), and the TCP range 51678 - 51680 for the ECS agent container (i found this on the doc) but doesn't work and tasks are not deployed. With all tcp port open and http 80, image is deployed nicely.

I'm really not an expert but a real rookie, and i'm pretty sure openning all outbound TCP ports in my security group is not a good idea. Is it really a security problem ?
Any advices will be really helpfull. Thank you !

1개 답변
3
수락된 답변

Hi

I think you need to allow outgoing traffic on port 443 and 53 (both TCP and UDP) for ECS to be able to pull images from ECR. Maybe this guide can help?

profile picture
전문가
답변함 10달 전
profile pictureAWS
전문가
검토됨 10달 전
profile picture
전문가
검토됨 10달 전
  • Really thank you for your quick help, it works perfectly ! Bravo !

  • 443 is https and 53 is dns. Both need to be open.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠