Setting up internal / private networking DNS?

Is it possible to setup DNS for private / internal only network interfaces? For example suppose I have a private network interface and I name it pnv1. I could add this to /etc/hosts, but if the network address changes, I have to update /etc/hosts for every single client that needs to access pnv1. So I’m wondering if digital ocean supports private networking DNS? I’m hoping I could essentially point /etc/hosts/ to this service and the service would then return the network address the client is trying to look up.

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Step one. Use a real domain you own. In addition to the free domains someone already mentioned, sub domains also work.

Step two. Understand DNS views.

Ultimately this means managing your own DNS servers and understanding more in depth how DNS is propagated/federated across the internet at large. BIND9 can be as easy or complex as you want it to be. There are other solutions as well but BIND9 remains the standard others reference.

I achieved that by following, but it only works if the DNS is a real one (not some internal fake DNS).

If the DNS doesn’t exist, I achieved that (accessing other droplets through the internal DNS) letting only DO internal nameservers IPs (, etc…) in resolv.conf (removed and from it).

The problem is that it won’t work when I try to lookup external sites.

In the end, I still don’t know how can I use Digital Ocean DNS internally with a fake internal DNS, in such a way that it resolves correctly when I ping a host in my internal domain, but uses or for external ones.

It will be great if DO provided some tutorial about how to do that.

Ping is unable to find the A record added to DigitalOcean DNS!