How to Install and Configure Bind 9 (DNS Server) on Ubuntu / Debian System

13 Responses

  1. FH says:

    Nice walktrough of a complex issue.

    You might reconsider using .local as your intranet name.

    Best practice is to use a FQDN and prefix it with eg. lan being lan.domain.tld. The need for it will show when you have to build a Microsoft AD.

    In the long run avoiding using .local will result in a more structured network and it will become more obvious if you operate mixed network using both Microsoft Windows, macOS and LInux.

    Also .local is a zeroconf domain used exclusively in zeroconf networking.

  2. Brad says:

    First off, I’m a complete Linux newbie!

    The restart command that you have above did not work for me. I had to run sudo /etc/init.d/bind9 restart to restart bind. Does this make any difference? How can I ensure that Bind is running as a service?


  3. Taufik says:

    Thanx for sharing nice tutorial

  4. Robert de Wild says:

    Hello. Great write up thanks. I was able to follow and configure your directions pretty much to the tee. But, when I get to the NSLOOKUP it always just resolves to
    No idea really where that is coming from. I do have a /etc/resolv.conf that lists that address as nameserver.
    However, if I change that file, it just gets overwritten again on the next reboot.
    Any ideas?

  5. jackson bakari says:

    i just install my new bind9 dns but when i check to the ‘’ i got this massage

    You don’t have permission to access / on this server.
    what does it means

  6. Mbonne says:

    Nice walk through. Exactly what I needed.
    +1 for FH comment about the .local in a mixed use environment.

  7. Gert Kruger says:

    Thanks for sharing! I am new to Ubuntu. It will help if you can provide a command to your comment: “Your forward lookup file should look like something below:”

    In other words, what command should we run to see the “forward lookup”?

    • Pradeep Kumar says:

      Hi Gert,

      In the tutorial i have copied the sample forward lookup file and then using vi editor I make changes that suits to my setup.

  8. Andreas Weier says:


    Thank you very much for this great tutorial.

  9. SANTANU says:

    How to configure dns-sec

  10. Kivi says:

    Hi, is there a option to add an entry without edit the file manual?

  11. Arben says:

    Hi, thank you very much for the tutorial. Can someone please explain why it was a requirement to put “primary” before the “.domainname.”.

    Thank you in advanced,

  12. Nithya says:

    Helpful Thanks

Leave a Reply to SANTANU Cancel reply

Your email address will not be published. Required fields are marked *