[lug] strange name resolving/ftp

rm at mamma.varadinet.de rm at mamma.varadinet.de
Sun Jun 10 06:01:31 MDT 2001


On Sat, Jun 09, 2001 at 07:28:38PM -0600, D. Stimits wrote:
> I've been playing with ftp config on a RH 7.1 beta machine (isolated
> from Internet, behind a firewall), and discovered something strange. I
> can do "ftp localhost" and "ftp 127.0.0.1", and get quite different
> results. The hosts file has both listed correctly, and ping is exactly
> the same, regardless of pinging localhost or 127.0.0.1. The odd thing is
> that I can ftp localhost and it works, but ftp 127.0.0.1 results in
> 421 Service not available, remote server has closed connection
> 
> I have experimented, and I can sometimes reverse this, where I can ftp
> 127.0.0.1 and it now works, but then ftp localhost fails. I can't get it
> to allow ftp with both forms at the same time. Does anyone have a
> suggestion for this?

To help debugging, what's your name resolution setup? 
What does /etc/nsswitch say, does your resolver consult
/etc/hosts before asking the DNS server (hosts: files dns)
or does it first ask the server (hosts: dns files) ?
What's the output of 'nslookup localhost' ?

 Ralf



More information about the LUG mailing list