I have an app hosted on ECS (ec2) network that listens on port 4000 (HTTP) and it's connected to ALB by dynamic port mapping - here everything is working correctly.
ECS service has ALB as a load balancer
But the same app accepts TCP connection (from GPS devices) port 5010. When I try to create a Network load balancer and in the target group specify port 5010 connection doesn't work.
Security groups are ok, ec2 instance SG allows all TCP from all clients (ipv4 and ipv6)
ECS Task (bridge network) port mapping looks like this:
0:5010
0:4000
Of course, if I create a target group with the id that dynamic port mapping gave me, everything works fine, but that's not the case. I want o use a dynamic port feature
Maybe someone knows how to solve that problem?
Thanks in advance for helping me!