Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to telnet from my windows box into a service running on a known-available port on a mac laptop, but the connection is getting refused.

  • I can telnet into the service locally.
  • Firewalls are set to pass-through on both ends.
  • Wiresharking the line shows that the SYN gets responded to with a RST, ACK. No connection is established.

What might be going on here? (Thanks in advance!)

share|improve this question
Just a note: it looks like the service may be bound to 'localhost' instead of to my IP or the loopback. I'll try these and update once I have results. – Joseph Weissman Jul 16 '11 at 17:50
localhost is the loopback, and that will prevent connection from outside the device. Try – Shane Madden Jul 16 '11 at 18:01
@Shane, thanks -- trying this now. – Joseph Weissman Jul 16 '11 at 18:11
Don't use telnet, use ssh. – Paul Tomblin Jul 16 '11 at 18:17
@Paul Tomblin: Debugging/testing a text based protocol (like SMTP, HTTP, IMAP) is a perfectly valid use case for telnet (the program). SSH is not a replacement in this case. – Sven Jul 16 '11 at 20:28
up vote 2 down vote accepted

localhost is the hostname for the loopback address - that will be the resolved hostname for both and ::1. If a service is bound to one of these addresses, it will only be available to attempts to connect locally to the loopback address.

A service that needs to listen for connections over the network should listen on a non-loopback address; you can manually specify the addresses to listen on, or go with the "easy route" of binding to (for IPv6, ::) to listen on all addresses (including the loopback).

share|improve this answer
You can use netstat -an | grep LISTEN to see what ports and addresses your TCP listeners are bound to. – Gordon Davisson Jul 17 '11 at 5:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.