Setting up internal / private networking DNS?

September 1, 2017 597 views
DNS Ubuntu 16.04

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.

1 Answer

Yes. DigitalOcean's DNS service can be used with private networking. The one caveat would be that the Droplets can not be completely isolated with its public interface disabled. They will still require outbound access to port 53 for DNS lookups. In general, public DNS does not care if the IP address it points to is accessible or not. So pointing internal.example.com to an private IP address with an A record will work, but it will not be accessible if you are not on that private network.

If you require complete isolation from the public network, check out this tutorial for information setting up a private DNS server:

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,...
Have another answer? Share your knowledge.