WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Connection refused  (Read 1970 times)

Offline helander

  • Full Member
  • ***
  • Posts: 183
Connection refused
« on: August 10, 2009, 12:56:59 PM »
I am trying to connect using telnet to a local application listening on port 5613.
If I connect using "telnet localhost 5613" it all works fine, but if I connect using
an IP address on one of the system's physical network interfaces
"telnet 192.168.0.11 5613" I get "connection refused".

Anyone have any idea of why and how to make connection via the physical interface address work.
The goal is to be able to connect from an external machine and trying that exposes the same refusal.

Kind Regards

Lars

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Connection refused
« Reply #1 on: August 10, 2009, 01:22:04 PM »
It sounds like the application is not bound to all interfaces. "netstat -l" should display something similar to the following:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp        0      0 0.0.0.0:ssh   0.0.0.0:*       LISTEN

and you should see an entry for port 5613, with a local address of 0.0.0.0:5613.

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Connection refused
« Reply #2 on: August 10, 2009, 01:53:50 PM »
Under Local Address it says "box:5613", apart from that the other stuff is per your example.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: Connection refused
« Reply #3 on: August 10, 2009, 02:04:59 PM »
Quote
Under Local Address it says "box:5613"
This confirms the application is listening on the "localhost" interface. The application must be directed to bind to all interfaces when listening for a connection, and every application has a different way to do that.

Offline helander

  • Full Member
  • ***
  • Posts: 183
Re: Connection refused
« Reply #4 on: August 10, 2009, 02:26:05 PM »
OK, thanks.