Re: Unexpected resolver behavior

2005-02-20 Thread Loren M. Lang
On Thu, Feb 17, 2005 at 10:04:22PM -0600, Jamie Ostrowski wrote:
> 
> 
> 
> I'm running 4.10-p5 on my workstation at home, and I can't understand
> why I cannot get www.foo.com to resolve to an IP I am specifying in
> /etc/hosts (I want to over-ride the IP returned by the nameserver I query
> by default).
> 
> 
> in /etc/hosts:
> 
> 199.xx.xx.24  www.foo.com.

Remove the . at the end of com.  Finishing domain names with a period
like that is only used in bind's zone files, nowhere else.

> 
> 
> in /etc/host.conf:
> 
> # $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $
> # First try the /etc/hosts file
> /etc/hosts
> # Now try the nameserver next.
> bind
> # If you have YP/NIS configured, uncom
> 
> 
> (I have no nsswitch.conf file in /etc)
> 
> 
> But when I try to resolve www.foo.com from the command line, I am getting
> the IP address from the nameserver from the outside world rather than the
> IP from /etc/hosts. I am not running a local named on this machine,
> either. Any ideas?
> 
> 
> 
> - Jamie
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> The Moon is Waxing Gibbous (71% of Full)
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Unexpected resolver behavior

2005-02-18 Thread Uwe Doering
Jamie Ostrowski wrote:
I'm running 4.10-p5 on my workstation at home, and I can't understand
why I cannot get www.foo.com to resolve to an IP I am specifying in
/etc/hosts (I want to over-ride the IP returned by the nameserver I query
by default).
in /etc/hosts:
199.xx.xx.24www.foo.com.
in /etc/host.conf:
# $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $
# First try the /etc/hosts file
/etc/hosts
# Now try the nameserver next.
bind
# If you have YP/NIS configured, uncom
(I have no nsswitch.conf file in /etc)
But when I try to resolve www.foo.com from the command line, I am getting
the IP address from the nameserver from the outside world rather than the
IP from /etc/hosts. I am not running a local named on this machine,
either. Any ideas?
Only programs that use gethostbyname(3) and friends (system library 
functions) can be expected to take heed of '/etc/host.conf', and 
therefore '/etc/hosts'.

Now, the utility commands that are part of the Bind package, like 
'host', 'nslookup' etc., talk to the DNS server directly and ignore what 
you have in '/etc/hosts'.  This can also be true for some applications 
(MTAs come to mind) that have their own DNS query code because they need 
DNS information that is not available through system library functions.

   Uwe
--
Uwe Doering |  EscapeBox - Managed On-Demand UNIX Servers
[EMAIL PROTECTED]  |  http://www.escapebox.net
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Unexpected resolver behavior

2005-02-17 Thread Jamie Ostrowski



I'm running 4.10-p5 on my workstation at home, and I can't understand
why I cannot get www.foo.com to resolve to an IP I am specifying in
/etc/hosts (I want to over-ride the IP returned by the nameserver I query
by default).


in /etc/hosts:

199.xx.xx.24www.foo.com.


in /etc/host.conf:

# $FreeBSD: src/etc/host.conf,v 1.6 1999/08/27 23:23:41 peter Exp $
# First try the /etc/hosts file
/etc/hosts
# Now try the nameserver next.
bind
# If you have YP/NIS configured, uncom


(I have no nsswitch.conf file in /etc)


But when I try to resolve www.foo.com from the command line, I am getting
the IP address from the nameserver from the outside world rather than the
IP from /etc/hosts. I am not running a local named on this machine,
either. Any ideas?



- Jamie










The Moon is Waxing Gibbous (71% of Full)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"