ftp localhost problems...

ftp localhost problems...

Post by Andrew Weddin » Fri, 11 Jun 1999 04:00:00



My problem:


Connected to localhost.
421 Service not available, remote server has closed connection
ftp>
ftp>quit

I am getting exactly the same problem with Telnet.

I must be missing something very simple, but here is what I
have tried and failed at doing...

/var/log/secure
--
Jun 10 09:29:08 brutus in.ftpd[1495]: refused connect from 127.0.0.1
--

The file permissions:
/usr/sbin/in.ftpd -rwxr-xr-x
/usr/sbin/in.telnetd -rwxr-xr-x
/usr/sbin/tcpd*  -rwxr-xr-x
/etc/inetd.conf   -rw-r--r--
/etc/host*         -rwxr-xr-x
/etc/pam.d/*     -rw-r--r--

Contents of files:
/etc/inetd.conf
--
ftp     stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
--

/etc/hosts.allow
--
swat: 127.0.0.1 192.168.0
swat: 192.168.0.1
swat: 192.168.0.2
192.168.0.1
192.168.0.2
127.0.0.1
--

/etc/hosts.deny
--
ALL: ALL
--

/etc/hosts
--
127.0.0.1 localhost localhost.localdomain
192.168.0.1 brutus
192.168.0.2 max
--

I am completely lost, am I looking in the correct places?  Obviously not..
what have I overlooked.  Surely there must be a rule, SOMEWHERE that is
telling ftp (or tcpd) not to accept any connections... but, I can't find it!
argh!!

Please help....

--
Kind Regards,
*************************************
           Andrew Wedding
       Final year BIT student
  Central Queensland University
http://users.bigpond.com/awedding
*************************************

 
 
 

ftp localhost problems...

Post by Thomas Zaj » Tue, 15 Jun 1999 04:00:00



> My problem:


> Connected to localhost.
> 421 Service not available, remote server has closed connection
> ftp>
> ftp>quit

> I am getting exactly the same problem with Telnet.

> I must be missing something very simple, but here is what I
> have tried and failed at doing...

Add the following line to /etc/hosts.allow:

in.ftpd,in.telnetd: 127.0.0.1,localhost

Then do a 'man 5 hosts_access' and 'man 5 hosts_options' to
understand why. Use 'tcpdchk' to check your tcpd configuration
for errors, and 'tcpdmatch' to check whether a specific host
and/or user would be granted or denied access using your current
configuration. Also read the man pages for tcpdchk and tcpdmatch.

Get used to read man pages in general. ;-)

HTH,
Thomas
--
=---        Thomas Zajic aka ZlatkO ThE GoDFatheR, Vienna/Austria        ---=
=--   "It is not easy to cut through a human head with a hacksaw." M.C.   --=
=--   Posted with Free Agent 1.11/32 running on Linux 2.0.36/Wine-990226  --=
=---        Spam-proof e-mail: thomas(DOT)zajic(AT)teleweb(DOT)at        ---=

 
 
 

ftp localhost problems...

Post by Andrew Weddin » Tue, 15 Jun 1999 04:00:00


Thanks for that it works a charm.. except that it now doesn't accept my
password for whichever user that I enter.  I had checked the man pages and
just couldn't understand why it wasn't working.

I also had already done tcpchk and realised that there was a problem with a
couple of lines that was missing the :  I now understand it all a little bit
better.

Thanks again,
Andrew
--
Kind Regards,
*************************************
           Andrew Wedding
       Final year BIT student
  Central Queensland University
http://users.bigpond.com/awedding
*************************************

Quote:> Add the following line to /etc/hosts.allow:

> in.ftpd,in.telnetd: 127.0.0.1,localhost

> Then do a 'man 5 hosts_access' and 'man 5 hosts_options' to
> understand why. Use 'tcpdchk' to check your tcpd configuration
> for errors, and 'tcpdmatch' to check whether a specific host
> and/or user would be granted or denied access using your current
> configuration. Also read the man pages for tcpdchk and tcpdmatch.

> Get used to read man pages in general. ;-)

> HTH,
> Thomas

 
 
 

1. ftp to localhost problem

when I "ftp localhost", I never get the "ftp>" prompt. In fact, I don't
get any prompt, even though it does say it connected to the localhost. I
can't even ctrl+c or ctrl+d to kill it. Of course, I checked my
/etc/inetd.conf. It's set to turn on with the "-l" flag. I commented out
the IPv4 and left the IPv6 version of ftp, but I don't see why that
could be the problem. So I "netstat -a", and get this..

Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp6       0      0  *.login                *.*                    LISTEN
tcp6       0      0  *.shell                *.*                    LISTEN
tcp6       0      0  *.telnet               *.*                    LISTEN
tcp6       0      0  *.ftp                  *.*                    LISTEN
tcp4       0      0  *.sunrpc               *.*                    LISTEN
udp4       0      0  *.sunrpc               *.*                    
udp4       0      0  *.syslog               *.*                    
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
c5fabfc0 dgram       0      0        0 c5fa0fc0        0        0
c5fa0fc0 dgram       0      0 c5f9f800        0 c5fabfc0        0 /var/run/log

...which is when I was 101% confused as to why my ftp isn't working. Is
there something else I'm not seeing here? Everything was left as the
default, except for my commenting out the IPv4 version of the ftp
running since I really don't need two verrsions of the protocol running.

         - Devon

2. Olicom token ring adapter -> 2.4 kernel

3. localhost -> localhost?

4. File owners/groups - Need advice

5. Samba Server (Localhost) - LOCALHOST?!?!?

6. Which IPs address should I give???

7. sard I/O accounting bug in -ac

8. IPCHAINS and mail on localhost: unable to send mail from localhost

9. unable to ftp localhost

10. Unable to ftp to localhost with RedHat 4.0?

11. Can't login to ftp even from localhost

12. Help: Cannot Ftp On Localhost