Skip to content

ec2 security groups with custom TCP port not working

0

Hi, I have one ec2 instance, one VPC, default NACL (allowing all) and some security groups created and attached to running instance. My question is, why predefined SG services such as HTTP, HTTPS, IMAP, SMTP, SSH are working (not blocking traffic), while each custom defined TCP port (i.e. 808, 3050 from 0.0.0.0/0) are not working the same? Services on these ports are running on the instance and reply both on 127.0.0.1 and 0.0.0.0 (tested with telnet and netcat). Any help appreciated, I was not able to find any mention about such behaviour :(

asked a year ago271 views
2 Answers
1

Hi

It also depends from where you are accessing these ports.

Typically, I have faced this issue despite having all the required SGs and NACLs in place, when I am on Corporate VPN/Office network. This happens as corporate networks have corporate firewalls which only allowlist certain well-known ports.

Maybe try accessing from your home WiFi or some other network.

AWS
EXPERT
answered a year ago
0

If custom TCP ports like 808 or 3050 are not working while predefined services are functioning, ensure that your security group rules explicitly allow inbound traffic on these ports from the desired sources (e.g., 0.0.0.0/0).

Verify that the services are bound to 0.0.0.0 on the instance and check for any OS-level firewalls or configurations that might be blocking the traffic.

EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.