# BIND vs. djbdns vs. MyDNS

## Doomwookie

I'm planing to move a few of my websites to a server in my house and was planning to setup some nameservers.  I've used bind before, but was wondering how some of the alternatives like djbdns and MyDNS compare.  

Do they perform any better, have nicer features, are they more/less secure?

----------

## Plaz

Are you serving names only within your home or also out to the internet?  I really like djbdns (& dnscache) for my home network.  It's a bit strange (but fairly simple) to configure.  I'd bet it's more secure than the others.  If you need a dynamic name server (i.e. with DHCP clients) for your home network then I'd recommend dnsmasq as an all-in-one package.

----------

## Doomwookie

Out on the internet actually.  I'm in the process of moving some sites off my old server to another server at another datacenter due to some screwups.  So while I'm doing this I thought I might go ahead and move some of my personal sites to a server I'm throwing together with one of my spare computers at home that I'm not using for development.

I'm getting some static IPs, upgrading my internet connections, and would like to run some nameservers along with the other staples of a good webserver.

At this point I'm not too worried about dhcp daemon because I'm planning to use my Dlink DSL router/firewall for the computers my family are using for desktops.  That will change soon as I figure a way to cap the bandwidth on all desktops so there is plenty of upstream bandwidth for the websites on the server.  (My sister and parents filesharing, it's a not easy to control their net usage even when I'm paying for the connection.)

----------

## arut8ur

Hi,

I am doing fine with Bind. I don't really know the other DNS Servers, so I can't say much about them,.. 

I have heard that djbdns is more secure,.. but not so feature complete. So if you want to do some more uncommon things, like spitted DNS zones, you might want to use Bind.

For the most top level domains, you have to provide a secondary DNS Server (slave), for the domains you want to host, which is in another class C subnet, so it cant be located at your place You may need to find an DNS Server which will act as an secondary DNS Server for your domains. This implies you keep them in sync, and I am sure you dont want to transfer the date unencrypted, so your DNS Server needs to support a zone transfer protocol, with an rndc key encryption ore something like this,.. only as a hint so you can check if the DNS server of your choice supports stuff,..

 *Quote:*   

> ...That will change soon as I figure a way to cap the bandwidth...

 

You should have a look for the "linux advanced routing trafic control howto" (LARTC), not very short (over 150 pages I think), but really good.

Greets

Jan

----------

## justanothergentoofanatic

I've been using PowerDNS with no problems so far. It is much easier to configure than bind or djbdns and its security record is fairly impressive; to date, it has only suffered from one potential DOS vulnerability. The main downside is that it's an order of magnitude slower than either bind or djbdns.

-Mike

----------

## Wilhelm

I currently switched from BIND to MyDNS. The reason is that MyDNS allows DNS to be updated by modification of the mysql database.

Only downfalls so far is that it doesn't support views as in when i ping my server from inside my network it gives my WAN IP which directs internal traffic to the internet and back which is not good. I solved this by only maintaining internal adresses using /etc/resolv.conf.

Have not had the time to do thorough tests on it's performance but it should be better once you have hundereds of entries.

Another thing i'm trying is to make two servers (primary and secondary DNS) replicate the DB to each other to allow for redundancy.

----------

## jwj

I am very pleased with djbdns, its easy to configure and was developed with security in mind.

----------

## Genone

I second PowerDNS, especially as you can select between different backends.

----------

## kashani

 *Wilhelm wrote:*   

> I currently switched from BIND to MyDNS. The reason is that MyDNS allows DNS to be updated by modification of the mysql database.
> 
> Only downfalls so far is that it doesn't support views as in when i ping my server from inside my network it gives my WAN IP which directs internal traffic to the internet and back which is not good. I solved this by only maintaining internal adresses using /etc/resolv.conf.
> 
> Have not had the time to do thorough tests on it's performance but it should be better once you have hundereds of entries.
> ...

 

Going through the docs and what not, the reason for database run DNS servers is more for management and known transfer times than for speed. I can't find any case that says it's significantly faster than Bind/djbdns. In fact most people seem to claim slower, though I haven't seen any numbers or real tests.

Also in the case of mydns it is very limited in what it supports, it can't even do recursive lookups according to the faq. 

You can easily do one way replication in Mysql, but it just seems so overly complicated to do this for a a moderate number of domains. Moderate meaning 1 to a 1000. Assuming your zones fit comfortably in RAM, your lookups can't possibly get faster by using an external data source. 

kashani

----------

## epretorious

I've been using djbdns as authoritative/secondary nameservers (but not as caching nameservers) for several domains for 6 months now. It's absolutely fantastic!    :Very Happy: 

----------

## Wilhelm

 *kashani wrote:*   

> Going through the docs and what not, the reason for database run DNS servers is more for management and known transfer times than for speed. I can't find any case that says it's significantly faster than Bind/djbdns. In fact most people seem to claim slower, though I haven't seen any numbers or real tests.
> 
> 

 

I'm by far saying it's faster i'm merely stating i haven't checked the performance and i'm stepping to it from a management perspective. I'm attempting to wire it all into a DB bound hosting system where all knowledge and settings are in the database.

 *kashani wrote:*   

> 
> 
> Also in the case of mydns it is very limited in what it supports, it can't even do recursive lookups according to the faq. 
> 
> 

 

You are right that it doesn't support much but it supports enough. And to allow it to do recursive lookups to the outside world just set "recursive = <gateway>" then it will search the internet if a domain did not pop up from your DB.

 *kashani wrote:*   

> 
> 
> You can easily do one way replication in Mysql, but it just seems so overly complicated to do this for a a moderate number of domains. Moderate meaning 1 to a 1000. Assuming your zones fit comfortably in RAM, your lookups can't possibly get faster by using an external data source. 
> 
> kashani

 

DB is a cleaner solution imo. Data should be in a database  :Wink: .

----------

## maalth

Bind does support mysql based zones.  I haven't tried it yet, but I did buy a second domain which isn't set up yet.  I will try it and I will most post a how-to in the Documents, Tips & Tricks section as well as Gentoo-Wiki.

----------

## splooge

 *Quote:*   

> DB is a cleaner solution imo. Data should be in a database

 

I prefer my data in RAM.   :Wink:   Especially if you're hosting what, 1 domain name?  Is it worth installing an entire database server for 1 zone file that's under 1k in size?

Anyways, I know running your own name servers sounds like fun, but it really isn't.  I have some pretty funny horror stories, including my domain being down for over a year because I was hosting my own name servers and my co-lo went belly up.  When that happened, my domain no longer worked, so I could no longer receive/answer the verification e-mails my registrar was sending to confirm the ns changes.  Catch-22.  Can't receive e-mails without a domain name, can't get my domain name working if I can't receive e-mails.  (These were the old days when Network Solutions were the only people selling domain names and web-based solutions didn't even exist yet)

Personally I use http://www.zoneedit.com .  AWESOME free dns hosting with uber dyndns support as well with a relative low TTL for fast updates.  (No need to run any dyndns-type client... a simple wget at startup works just fine)

----------

