Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a requirement to disable the caching in squid except for the DNS. I have done a configuration change in squid.conf like "cache deny all" does this help me out? I think it also disables DNS cahching right? so can any one help me to solve this issue.

share|improve this question

You just want to cache DNS? Why not just take squid offline and use bind?

share|improve this answer
Hi thanks for the i'm not using any DNS server,in fact i want to enable Squid DNS caching alone to fulfil my requirement.I read in some squid Doc's saying DNS caching is always enaled in Squid, but as i'm adding "cache deny all" does this apply to DNS caching too? – srinuvenu May 11 '11 at 17:47
Is your requirement literally "Squid must be running for DNS caching only"? – Hyppy May 11 '11 at 17:49
+1 for Bind. Squid is designed primarily to cache HTTP traffic, and as such is overkill for caching DNS; Bind, on the other hand, is designed for DNS, including caching DNS queries. Right tool, right job... – Kromey May 11 '11 at 18:22
Hi Hyppy , thanks for the help..i was lill bit confused with Bind and Squid it think Bind is better option for my requirement. – srinuvenu May 16 '11 at 6:47

What you want to do isn't possible. Squid is an http cache, not a caching name server. It will listen for http requests and reply to them with cached content. It does not listen for DNS requests and can not reply to them. It's true that squid caches DNS requests, but this is for its internal use. Web browsers do the same thing; it doesn't mean you can use Firefox as a DNS cache.

Like Hyppy said, you can configure a name server, such as bind or dnsmasq, to do what you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.