# Simple question about DNS cache and Proxy



## danaeckel (Feb 20, 2012)

Greetings,

I have a silly question about DNS cache server and proxy server. Are they the same? Also in the home server I am working on, would I want to use BIND (yeah I know it takes a bit to configure). For best performance, what is the best way to go?

Dana


----------



## Beeblebrox (Feb 21, 2012)

Maybe not exactly what you had in mind, but for small networks (home server) you can just use hosts(5)().


----------



## kpa (Feb 21, 2012)

A DNS cache server is kind of a proxy server but only for DNS data. You don't need to use BIND unless you have your own domain and you're hosting the nameservers for your domain yourself. For home server a DNS forwarder that acts as a DNS cache is sufficient, I use dns/dnsmasq myself.


----------



## danaeckel (Feb 21, 2012)

So I take it a proxy doesn't do DNS Cache?


----------



## DutchDaemon (Feb 21, 2012)

Define what you mean by 'proxy'. It can mean several things.


----------



## danaeckel (Feb 22, 2012)

Like what Squid does.


----------



## DutchDaemon (Feb 22, 2012)

Squid simply uses the local resolver(s) as defined in /etc/nsswitch.conf, so usually a hosts file and resolv.conf. The proxy caches downloaded web data, nothing more. If you want to do local DNS caching use one of the resolvers in /usr/ports/dns, like the aforementioned dns/dnsmasq or the one that I use everywhere, dns/unbound. Or just put one or two nameservers in /etc/resolv.conf, like OpenDNS's open nameservers, and be done with any local configuration.


----------

