On 03Sep2011 04:56, Michael D. Setzer II mikes@kuentos.guam.net wrote: | Our MIS department just decided to not allow the use of the public | IP addresses of system from local machines, so I made the | additions to the hosts file with the private ip and the name. | restart named and restarted squid, and squid picked up the | change, and would bring up pages using the name. Unfortunately, | dig and other options would still be using the public IP instead. | | Tried restarting the machine to see if something might not have | been changed, but it remains the same.
/etc/hosts is not part of DNS. It is part of the name lookup procedure used by gethostbyname(). So: squid is affected by /etc/hosts, but dig and named are NOT, and will not be: they are specificly DNS tools.
My recommendation is to add a special .local zone to your named with names host1.local etc with the private addresses. Then add local to the _front_ of the search path in /etc/resolv.conf:
search local your.normal.domain.here
Then using the short names should work.
Cheers,