Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Using public DNS for intranet hosts?



On Fri, 28 Aug 2026 15:42:05 -0400
Daniel Barrett <dbarrett at blazemonger.com> wrote:

> Is it a good idea, bad idea, or neutral idea to use the DNS server at
> the *registrar* for example.com to implement these names? For example,
> if my registrar is registrar.com, I would create an A record (at
> registrar.com) for the name "foo.example.com" that resolves to an
> intranet IP address like 192.168.0.15.

Bad idea. You're trying to put non-routable IP addresses into a public
DNS zone. At the least your RR records will be a disaster, assuming
your registrar or DNS provider let you do it at all.

The correct solution is to run a little caching nameserver inside your
private network and put your private records here. Since I run pi-hole
I can use it as a specific example. pi-hole out of the box (in my
experience) uses the server's /etc/hosts file:

192.168.1.11            dhcp11.marller.net
192.168.1.12            dhcp12.marller.net
192.168.1.13            dhcp13.marller.net
192.168.1.14            dhcp14.marller.net
192.168.1.15            dhcp15.marller.net
192.168.1.202           marller.marller.net marller.net marller
192.168.1.204           hild.marller.net hild

So I get to see all of my internal hosts with their internal IP
addresses inside while marller.net and my public records resolve
correctly from outside:

$ host marller.net
marller.net has address 192.168.1.202

$ host marller.net
marller.net has address 173.48.211.51

-- 
\m/ (--) \m/



Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org