This content has been marked as final. Show 2 replies
Telnet was not designed to be a port testing tool. To query a specific port on a local machine:
lsof -i tcp:22
lsof -i -n -P
For more sophisticated tasks and checking other machines install "nmap".
If you suspect a problem with your firewall do not flush or delete the tables, instead simply disable the firewall for the duration of your testing, e.g.
service iptables stop
service iptables start
Well, do you have any listeners on those ports? Do this:
and check if the port number you want to connect to is listed.
# /bin/netstat -ln
It is best to check for port connectivity using the netcat nc(1) utility. Use netcat instead of telnet(1) because netcat will return a different message for each failure reason; telnet(1) just says the equivalent of "It's broken."
So, instead of this:
$ telnet host port
Be sure to try this as root, if you can; with some ports it matters.
# /usr/bin/nc host port