My websocket server is running on port 9000 on an ec2 instance.
It's working perfectly when accessed through a browser.
But I am unable to do telnet to it.
I did telnet ec2.x.y.z.com 9000 and the response is :
telnet: connect to address 54.251.xx.yyz: Connection timed out
Asked
Active
Viewed 3,727 times
-2

simplfuzz
- 269
- 1
- 4
- 10
-
What's the output of `netstat -an|grep -w 9000` on the server? – MadHatter Jan 10 '13 at 08:09
-
Are you trying from the same machine in both cases? Do you have some proxy server configured in your browser? – Khaled Jan 10 '13 at 08:13
-
@Khaled. No, I am trying from different machines. No proxy server configured in the browser. – simplfuzz Jan 10 '13 at 08:37
-
@MadHatter tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN – simplfuzz Jan 10 '13 at 08:38
-
@Khaled It works if I do telnet from the same machine. – simplfuzz Jan 10 '13 at 08:45
-
1@dta: It seems that you have a firewall that is preventing you from accessing the server. – Khaled Jan 10 '13 at 08:49
-
1dta, if you're saying that **from a given host** when you visit the site on port 9000 by browser, or contact the machine on port 9000 by telnet, you get the same result, then your question is **fundamentally** flawed. I agree with Khaled, that at the moment it looks much more likely that the machine that can't connect via telnet (or, presumably, by browser) is firewalled off in some way. – MadHatter Jan 10 '13 at 08:49
-
@Khaled Yes you are right. I was trying to do telnet through a HostMonster machine - which blocks outgoing connections to most of the ports. https://my.hostmonster.com/cgi/help/500. Can you put your answer separately - so that I can accept it. – simplfuzz Jan 10 '13 at 09:40
-
@dta: posted an answer – Khaled Jan 10 '13 at 10:19
1 Answers
0
From the posted comments, it seems to me that you have a firewall that is preventing you from accessing the server. If so, you should not able to be access the server using the browser not only using telnet.

Khaled
- 36,533
- 8
- 72
- 99