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 correctly. 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 either. Thanks Chris
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. #cache_dns_program /usr/lib/squid/dnsserver # 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! #dns_children 5 # TAG: dns_defnames on|off # Normally the 'dnsserver' disables the RES_DEFNAMES resolver # dnsserver to handle single-component names, enable this #dns_defnames off # TAG: dns_nameservers # Use this if you want to specify a list of DNS name servers # Example: dns_nameservers 10.0.0.1 192.172.0.4 #dns_nameservers none # 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 # dns # 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 order hosts,bind multi on
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.