1

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.

YATIN GUPTA
  • 203
  • 1
  • 2
  • 9
  • have you configured security groups ? – Federico Galli Jun 15 '17 at 12:33
  • "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." This line is in respect of security group. – YATIN GUPTA Jun 15 '17 at 12:51
  • Turn off iptables and test. This will test security groups and network ACLs. If that works please edit your post to include that information. Having all the information in the question, rather than piecemeal throughout the comments, makes it easier for people to help you. – Tim Jun 15 '17 at 19:19
  • That not works . – YATIN GUPTA Jun 16 '17 at 05:46

1 Answers1

2

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.

YATIN GUPTA
  • 203
  • 1
  • 2
  • 9
  • 2
    And that is why an actual error message is more helpful than a generic `I am unable to do X`. The actual error message of your telnet client would have made the problem clear instantly. – Gerald Schneider Jun 16 '17 at 06:58