![]() |
VOOZH | about |
An important part of managing server configuration and infrastructure includes maintaining an easy way to look up network interfaces and IP addresses by name, by setting up a proper Domain Name System (DNS). Using fully qualified domain names (FQDNs), instead of IP addresses, to specify network addresses eases the configuration of services and applications, and increases the maintainability of configuration files. Setting up your own DNS for your private network is a great way to improve the management of your servers.
In this tutorial, we will go over how to set up an internal DNS server, using the BIND name server software (BIND9) on Ubuntu 18.04, that can be used by your servers to resolve private hostnames and private IP addresses. This provides a central way to manage your internal hostnames and private IP addresses, which is indispensable when your environment expands to more than a few hosts.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Former Senior Technical Writer at DigitalOcean, specializing in DevOps topics across multiple Linux distributions, including Ubuntu 18.04, 20.04, 22.04, as well as Debian 10 and 11.
Software Engineer @ DigitalOcean. Former Señor Technical Writer (I no longer update articles or respond to comments). Expertise in areas including Ubuntu, PostgreSQL, MySQL, and more.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
Very great tutorial! I had some issues on Ubuntu 18.04 because the previous tutorial did not cover it. The new portion covering Netplan really saved my day!
Thank you.
For the ACL, can I put it in named.conf instead in named.conf.option?
Excellent tutorial.
Regarding the section:
“Checking the BIND Configuration Syntax”
I’ve found when running the following command I receive these errors “zone zone.name/IN: loading from master file db.zone.name failed: file not found & zone zone.name/IN: not loaded due to errors.”
sudo named-checkzone nyc3.example.com db.nyc3.example.com
However if I append the path name, as you did in the second example for the reverse zone I receive no errors.
sudo named-checkzone nyc3.example.com /etc/bind/zones/db.nyc3.example.com
Should the tutorial be updated to reflect my changes? So far DNS is working as expected for me.
Thanks!
Great tutorial, thank you!
After all the configurations and testing with dig tool, I encountered errors about DNSSEC for some domains and fixed them by adding the following lines to /etc/bind/named.conf.options file.
dnssec-enable yes;
dnssec-validation yes;
Hi great tutorial, is the same steps to create a Reverse DNS for a ISP or an Authoritative-Only DNS?
Thanks
/etc/default/bind9 OPTIONS=“-u bind -4”
In Ubuntu 20.04 - this file is /etc/default/named. Or better check which environment file is being used in systemd service.
cat /etc/systemd/system/bind9.service
[Service] EnvironmentFile=-/etc/default/named
I have face some error zone betfire247.com/IN: loading from master file db.betfire247.com failed: file not found zone betfire247.com/IN: not loaded due to errors.
i got inspired by this tutorial how to set up an internal DNS server
so i did implement this and made https://github.com/noud/infra-dns a working internal DNS server infrastructure on APT Linux.
Thanks for your instruction. I’m struggling with this setup. Could you clarify me on this problem? I intend to “nslookup host1.nyc3.example.com” from inside ns1 (DNS server). After doing as the instruction, I could test nslookip command on clients but cannot do it on DNS server. Thanks for your reading
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.