Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
localhost is the loopback, and that will prevent connection from outside the device. Try 0.0.0.0. –  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
3  
@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. –  SvW Jul 16 '11 at 20:28

1 Answer 1

up vote 2 down vote accepted

localhost is the hostname for the loopback address - that will be the resolved hostname for both 127.0.0.1 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 0.0.0.0 (for IPv6, ::) to listen on all addresses (including the loopback).

share|improve this answer
1  
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

 
discard

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.