by CydeWeys · 9y ago · 0 comments
The best practice for at least the past decade has been to either use subdomains of globally resolving domains that you own, or use one of the four testing TLDs specified in RFC 2606 that are guaranteed to never be delegated: https://tools.ietf.org/html/rfc2606
Unfortunately, not one of those four is designed for the use case of "private domain, for use in production", which is pretty common for companies to use.
.test is for "testing of current or new DNS related code"
.example is for "documentation or examples"
.invalid is for "online construction of domain names that are sure to be invalid and which it is obvious at a glance are invalid"
.localhost is for the loopback (and using it otherwise breaks existing code)
Nothing prevents the first three from being used for this purpose, but at best it's semantically awkward and jarring. What sysadmin wants services running on an internal VPN to use the TLD ".test" or ".example"?
Domain names that only resolve internally are a security anti-pattern. You should have full authentication on all services, and not rely on simply being able to reach a service in order to grant access. See e.g. DNS rebinding as one attack vector that can really ruin your day if you don't do this.
* http://jdebp.eu./FGA/dns-client-all-proxies-must-provide-sam...
I also wrote a Frequently Given Answer describing some more of the mistakes that people have made over and over in this, that one should learn from and not repeat.
* http://jdebp.eu./FGA/dns-use-domain-names-that-you-own.html
What's so bad about service.company-internal.com? (or service.internal.company.com, but some people understandably prefer having them totally separated) You don't have to actually resolve the internal names publicly.
No, but you do actually have to reserve the public domain, which can be inconvenient or undesirable for all sorts of reasons.