[svlug] Local computer responds "connection refused"

Dan Martinez dfm at area.com
Sun Jan 6 22:56:02 PST 2002


Todd G. Gardner wrote:

> I am trying to ftp or telnet to another linux computer inside my
> LAN. I can use samba to connect to the computer if it is booted into
> windows but when I ftp, finger or telnet to that ip address it
> returns "Connection Refused". I can ping the box that I am trying to
> ftp to.
> 
> 
> How should I connect to the system to ftp, etc...?

In order for what you're attempting to succeed, two things, broadly
stated, need to be true:

    1. Programs must be running, on the Linux box, which "listen" for
       connections on the standard ports corresponding to the services
       you're attempting to access.

       Programs whose principal task it is to listen on ports, and
       provide services through them, are commonly known as "daemons".
       The daemon for a specific service usually bears a name
       beginning with the name of the service and ending in "d":
       telnetd, ftpd, fingerd, httpd, etc.

       If you're not running daemons appropriate to the services you
       want the Linux box to provide, "connection refused" is exactly
       what you should expect to see.

    2. Packets from other machines must actually be able to reach the
       listening daemons on the Linux machine. Several things could
       prevent that, the most likely of these being an overly-
       restrictive firewall on the Linux machine.

In order to solve your problem, you're going to have to get familiar
with the basics of administering the Linux machine. (You didn't
mention which distribution it's running, which makes it a little
harder for us to offer you specific advice.) Find out how to determine
the status of daemons on the machine, and how to enable and disable
them.

If they weren't enabled, and enabling them lets you access the
services you want, you're all set. Otherwise, you may have to delve
deeper into the machine's networking setup, but that's a bridge best
crossed in its own time.

Incidentally, I'd be remiss if I didn't mention that telnet and ftp
are dangerous protocols to be using in this day and age. They transmit
passwords in the clear, meaning that they're vulnerable to
packet-sniffing. The sooner you get out of the habit of using them,
and become familiar with the likes of OpenSSH instead, the better off
you'll be.

Dan




More information about the svlug mailing list