Bind9 How-to in Ubuntu

I struggled a whole day getting bind to work properly after looking at 50 how-to’s and 100 some odd forum posts I got it to work.  Kinda silly it took this much work to get it working.  *shrug*

  1. Install bind: sudo apt-get install bind9
  2. Generate a new key (why the default one dosn’t work, but i couldn’t ever get it to): sudo rndc-confgen -a -b 128 -r keyboard
  3. Copy the output into a file or just to your clipboard.
  4. Open your named.conf, in it (probably very top would  be best) enter the info from the previous output.
  5. Example: key “rndc-key” {
    // how was key encoded
    algorithm hmac-md5;
    // what is the pass-phrase for the key
    secret “<your special key>” ;
    };
  6. Now you should create a rndc.conf file, it should look like this: options {
    // what host should rndc attempt to control by default
    default-server localhost;
    // and what key should it use to communicate with named
    default-key “rndc-key”;
    };server localhost {
    // always use this key with this host
    key “rndc-key”;
    };

  7. key “rndc-key” {
    // how was the key encoded
    algorithm hmac-md5;
    // what’s the password
    secret “<your special key>”;
    };Check and make sure you have a rndc.key file, it should look like this: key “rndc-key” {
    algorithm hmac-md5;
    secret “<your special key>”;
    };
  8. Now everything should work, just setup your databases and give it a try.  Let me know if it dosn’t work, I’ll see if Ileft something out

Tags: , ,

Leave a Reply