Docker – Unable to telnet at port 80 AWS EC2 instance

amazon-web-servicesdockerkuberneteslinux-networkingtelnet

I have allowed port 80 on my ec2 instance, and this is my iptables rules on it

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy DROP)
target     prot opt source               destination         
DOCKER-ISOLATION  all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain DOCKER (1 references)
target     prot opt source               destination         

Chain DOCKER-ISOLATION (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere 

I tried to telnet from my local ubuntu desktop and other aws instance but unable to telnet it. To telnet I use

telnet X.X.X.X 80

As I am unable to telnet every aws instance I made so, I checked its VPC setting, In route tables route to internet gateway is there to 0.0.0.0 . And I am using default vpc setting.

Next I find I am able to telnet port 22 but not other ports that are allowed for all inbound and outbound traffic on those instances.

Now I am not understanding why I am unable to telnet this instance at other ports.

Best Answer

This problem is comming because there is no service running at port 80 on server, thus even though allowed by firewall and security groups, I am unable to telnet. Thanks guys for you answers.