My apologies for the long post, but there's a peculiar problem I can't
figure out:
I have a FreeBSD 2.1.6 machine called "sitagw2k" from which "ping
sitagw2k", "ftp sitagw2k", "telnet..." etc work fine. But "host
sitagw2k" and "nslookup sitagw2k" don't work. I dont have "named"
running - we have a gateway/firewall machine which is used as a
nameserver as well as our link to the outside world. That part is
fine: "nslookup ftp.freebsd.org" returns 165.113.58.253 and
wcarchive.cdrom.com, for instance.
So I have the peculiar situation that these commands can find others,
but not the machine on which they are running!
Details of configuration:
This is FreeBSD 2.1.6 on an unused P75 that nobody claimed - it is
*not* possible to sanctify its existence by including its name and IP
address in the NIS maps because if I attempt to do that I might lose
the machine (don't ask :-) So I always refer to it by its IP address,
and everything works fine (FTP server, X server, Samba, is all I've
loaded on it so far).
But I loaded apache today, and got an unknown host error when
attempting to "http://iii.jjj.kkk.lll/~sitaram" (where the iii stuff
is the IP address). The error I got was that "sitagw2k.mydomain.com"
was not found - it had resolved the IP address into a name, then
failed on the name lookup!
I spent about 2 hours trying to figure this out - during which time I
found out about host and nslookup! I'd never had occasion to use them
before...I figure if I can get them to recognise "sitagw2k", apache
will too.
Other details: (1) "named" is not running. (2) /etc/hosts contain the
127.0.0.1 (localhost) entry, as well as the sitagw2k entry with my IP
address on it. (3) resolv.conf has our "gateway"s IP address as a
nameserver.
Any help, pointers, or suggestions much appreciated! I'm at the end
of my tether. I'd be happy to supply any other details that might be
pertinent that I have missed.
Sitaram