VOOZH about

URL: https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-ubuntu-18-04

⇱ How To Configure BIND as a Private Network DNS Server on Ubuntu 18.04 | DigitalOcean


How To Configure BIND as a Private Network DNS Server on Ubuntu 18.04

Updated on March 23, 2022
Not using Ubuntu 18.04?
Choose a different version or distribution.
Ubuntu 18.04
👁 How To Configure BIND as a Private Network DNS Server on Ubuntu 18.04

Introduction

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.

Learn more about our products

About the author(s)

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.

Still looking for an answer?

Was this helpful?

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!

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

👁 Creative Commons
This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 4.0 International License.
  • Deploy on DigitalOcean

    Click below to sign up for DigitalOcean's virtual machines, Databases, and AIML products.

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and AI-native businesses

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

© 2026 DigitalOcean, LLC.Sitemap.
Dark mode is coming soon.