Red Hat Bugzilla – Bug 10573
DNS not working as it should????
Last modified: 2014-03-16 22:13:14 EDT
Ok, so here is the deal.
I have setup a new box with 6.2 on it. I have set it up to be a new proxy
server, webserver & mail server.
I have gone through the setup, the /etc/resolv.conf file is setup
My dns server also resolves internal IP addresses.
When I try and ping one of the internal hosts, it resolves fine. Yet, I
have to give the FQDN in order for it to resolve through the proxy. Also,
when I enter hosts into the hosts file, it doesn't resolve those items
What do you have the various dns_* variables set to in
your squid.conf file?
Here are all the lines that have dns on them... (grep -i dns squid.conf)#
in the access.log. To do this Squid does a DNS lookup of all
# TAG: cache_dns_program
# Specify the location of the executable for dnslookup process.
# TAG: dns_children
# The number of processes spawn to service DNS name lookups.
# To disable dnsservers, set this to 0. NOTE, this is very
# strongly discouraged. If you disable dnsservers your Squid
# process will BLOCK on DNS lookups!
# TAG: dns_defnames on|off
# Normally the 'dnsserver' disables the RES_DEFNAMES resolver
# dnsserver to handle single-component names, enable this
# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# Example: dns_nameservers 10.0.0.1 18.104.22.168
# negative caching of DNS lookups.
# TAG: positive_dns_ttl time-units
# Time-to-Live (TTL) for positive caching of successful DNS lookups.
#positive_dns_ttl 6 hours
# TAG: negative_dns_ttl time-units
# Time-to-Live (TTL) for negative caching of failed DNS lookups.
#negative_dns_ttl 5 minutes
# A list of other DNS names that your cache has.
# TAG: dns_testnames
# The DNS tests exit as soon as the first site is successfully looked up
# If you want to disable DNS tests, do not comment out or delete this
#dns_testnames netscape.com internic.net nlanr.net microsoft.com
# By default Squid checks that DNS responses are received
Is squid resolving only the hosts present in DNS,
as opposed to those in /etc/hosts?
My domain (internally) is internal.horizon.sk.ca, when I reference a 'local'
website, I must give the FQDN in order to get there. This is not a huge deal.
But when I add hosts to /etc/hosts (for named multiple servers under
apache/IIS), then it resolves via DNS, instead of what is listed
in /etc/host.conf, which is:
root@goofy:[ /home/cyeo ] cat /etc/host.conf
Duh, I forgot.
squid, as of version 2.3, does its own DNS lookups internally,
no longer using a 'dnsserver' child. It does these DNS lookups
directly, without going through gethostbyname(), and therefore
ignores /etc/hosts, NIS, and other things of that sort.
If you want to use the old DNS child processes, you need to
recompile with --disable-internal-dns.