What domain name to use for your home network
ctrl.blog
ctrl.blog
You don't suddenly want to be restricted to HTTPS only (i.e. when Google bought .dev). There's also the minor risk of someone eventually buying your domain and causing all kinds of funky hell, like setting proxies to your internal network (through WPAD) and the names of local services (printer, router, etc.) being queried to a real DNS server because your computer sometimes appends the domain name to TLD-less queries. I've seen it happen that someone set something like example.com as their local domain (including in the DHCP config) who then saw constant slowdowns as their browser tried to resolve http://local-service/ as http://local-service.example.com/, going out to the internet every time, and not caching the error response.
In fact, that's part of the reason things have gone to the cloud, because what should be local internet style appliances (think of a media server that you just plug in and works with your stereo/tv) can't find each other easily -- all because you can't resolve a freakin name on the local DNS without setting up bonjour or your own DNS server.
The more interesting stuff begins when you want several boxes, and also your laptops, phones, tablets, etc to form a reasonable LAN, while accessing the internet. Bonus points for remote access to your LAN from outside it using your laptop or phone. Etc, etc.
At this point almost every major OS (including Windows 10 after the right feature update) mDNS mostly just works out of the box: ask for somehostname.local and if a system responds "oh, that's my hostname" things mostly just work. (mDNS was once called "Bonjour" if that helps connect the dots on what it is and how long many OSes have supported it.)
So don't use .local for DNS and mDNS works fine in so many cases these days you don't really need set a DNS for your local systems anyway. (Though if you do want a setup, I think this article is correct and home.arpa is the safest option available. .lan is also a bad idea because it isn't RFC protected and could be bought by someone as gTLD just as Google bought .dev.)
Self signed ssl certs were kinda a solution to this -- and then were largely rejected as being absolutely "insecure" because they, well, were absolutely insecure.
Is it damn hard to have a cable modem + router box and a WiFi access point in your home? Likely it's a no-brainer; each of them is at least as complex as a DNS server. Incentives matter.
I would much rather pay google $1/month to hold my data fairly securely than have to trust WD/Seagate/whoever to secure it.
And for IoT bits the problem is solved, Apple Home allows local only IoT devices and if you have an ipad or apple tv in your network you can always reach your iot devices without having to care about DNS. You might complain that this is a centralized cloud service but thats not far off what DNS is. You have to ask someone where your network is.
https://tools.ietf.org/id/draft-chapin-rfc2606bis-00.html#rf...
Going forward, I agree. However for many years, the recommendation from large providers (including Microsoft) WAS to use .local
I've got .local as my internal network. For some people, it's not a trivial job to re-domain everything.
It's not worth the effort to break mDNS because lots of apps can use mDNS, it's a useful standard. In fact, in many LANs today (on modern operating systems inc. relatively recent versions of Windows 10 as Microsoft was one of the last to adopt mDNS) mDNS does almost everything people would want DNS to do in LAN scope anyway and you could get away with not assigning any local DNS and just using mDNS services.
It really doesn't make much sense to propose as a solution to a potential configuration problem subscribing to a service with the goal of never using it.
It wouldn't be far-fetched to suggest reserving a subdomain of a domain you already own and use for that specific purpose, but paying for a subscription just to configure your internal DNS doesn't sound reasonable at all.
I've worked in gov places where they care about this detail. It's quite a sad 'security by hiding' mentality.
Oh no someone knows my current IP is 192.168.0.100 <scared/>
I, sadly, went for Namecheap, and they don't integrate with let's encrypt :(
I know I could use the http challenge solver, but I would have to expose a publicly-available endpoint and I would prefer to avoid that !
Or in ICANN management-speak: "Whereas, the Board considered that the applicants were not aware before the application window that the strings .CORP, .HOME, and .MAIL would be identified as high-risk, and that the delegations of such high-risk strings would be deferred indefinitely." [1]
[1]https://features.icann.org/addressing-new-gtld-program-appli...
Normally I would agree. But in this case, 5 years (2018-2013), a $185,000 refund, high-profile media coverage and an explicit "deferred indefinitely" statement later ? I don't think any of us will see .CORP, .HOME and .MAIL on the internet in our lifetimes !
[EDIT:] (I'm not saying it is; just that GP may think so.) [/EDIT]
With the rant ended: can anyone explain to me why all the relevant organizations can't get together and assign a TLD for this purpose that doesn't end in `.arpa`?
The name system is a unique non-renewable resource. And it's not like ICANN gave people a lot of choice for unregistered domains.
By your logic, I suppose .onion was not fine either, till cca 2015 when it got special-use status? And all the name system alternatives should be abolished, because we need to rent their TLDs to some uninterested party?
You are correct.
[0] me
I also have a wildcard le cert for *.local.domain.com.
example.com is guaranteed not to interfere (and example.org)
If a task only recurs less frequently like say every 3-5 years, it is more likely to be forgotten it is the same whether it is individual or companies.
"Person of Colo(u)r"?
This is one of those situations where too many warnings just causes users to ignore things. The only warning I needed - your card expired - was either missing or hidden in the morass of "ordinary" warnings.
It happens.
yes, and that's EXACTLY what example.com is for, this precise circumstance
smh
You're acting smug but nobody can tell why right now
It has none of the downsides/gotchas from a technology point of view. Just have to make sure to renew your domain registration!
...why?
My DNS server, my rules, no? Why should I feel obligated to follow ICANN? Obviously, I'll need to make changes if someone ever registers the domain with ICANN (and I want to access the ICANN version), but other than that...
Not so important for you with your 200 tabs open, but quite important to the people maintaining the root servers who see a significant percentage of all queries being for bogus domains that don't exist.
I get the boys out rule sentiment, but isn't resolving domain names, even those that don't exist, the whole purpose of root servers?
I mean, your suggestion reads like asking not to type URLs wrong because a significant percentage of requests are 404s.
The root servers shouldn't be a dumping ground for unnecessary traffic when proper DNS configuration is not that difficult.
No DNS hardware is smart enough to know that you meant ".arpa" not ".apra" you actually typed in.
Typos are not really a valid argument, it can happen for any type of domain.
That's the same line taken by network admins who think they know better than using RFC1918 IP ranges for their LAN.
As a satellite office and an acquisition, we played all kinds of games to try to figure out whether we should send a given IP address out to the Internet or to corporate. Apple’s IP range was entirely overlapping and of course the corporate networking group just threw up their hands and said “send it to us; the internet is not a business critical function.”
This was in the early 2000s, not the early 90s.
Also, does your DNS server correctly filter "out"-of-bailiwick responses for .lan etc. zones that are actually perfectly well in-bailiwick because they're from the actual delegated-by-the-real-root-servers nameservers, they're just not from your private server that you've configured? If not, I can execute a cache-poisoning attack against you.
But you seem to be on our network with all of us and so here you need to obey our rules or things won't go so well for you.
Sounds like a toothless threat.
The main issue is if it gets sold later, or assigned by RFC. As an example, more than one company I've worked for used .dev as a TLD for their dev environments, with local DNS to override it. Once google bought .dev, this meant that:
- we couldn't access anything Google put on .dev
- suddenly, all of our test sites had HTTPS forced, because .dev was HSTS preloaded by Google
The point here is that an unexpected change that you might not be aware is coming can break your setup in ways that are awkward to resolve - eg HSTS preloading means that you can no longer access non HTTPS endpoints unless you do it by IP and that leads to a frustrating afternoon - and it's inevitably always when you don't want it.
Like it or not, ICANN operates the DNS space. There's a proper way to get your own piece of this space, and you can run home or business networks under your own piece and you have a guarantee that no one will break you - because it's yours.
(edited for formatting)
That's harder than it sounds, with more and more apps implementing their own DNS over HTTPS clients - Firefox does it for instance, so does Chrome.
https://www.myhelpfulguides.com/2018/07/30/redirect-hard-cod...
Afaik nobody has a fix for the client hostility that DoH brings to the table.
Yes we have all abused unencrypted DNS to take the littlest bit of control back from hostile devices but we’re the minority of a minority who lose out in this situation where everyone else is now shielded from random sketchy Wi-Fi hotspots, and their ISP.
But a great counterargument would be "too bad, Firefox and now Google are doing it anyway, you lost and this is the world we live in, so deal with it." And, you'd have a point!
That's what a former employer had set up for their internal environments.
Worked great until mDNS came along and Apple devices insisted that .local had to go through mDNS rather than our DNS servers.
The Mac users had a constant stream of complaints because of it: "I can't connect to the printer", "Shared drives don't work", "I can't access the CI environment in Safari/Chrome/whatever"
I use `.zz`.
It's short, easy to type, and in order for that to be assigned out, we'd need an entirely new country to be created (one that decided the other bazillion free CCTLDs are not to their liking). And like you say, I only run into a problem if I decide I want to access things from said country.
Would I do this in any professional setting? Absolutely not. For my own stuff at home? The risk is pretty minimal and the work involved in updating if I ever have to is not too bad.
DHCP automatically registers everything under <hostname>.zz, and I cname well-known things from <thing>.svc.zz to the appropriate hostname so I can hit, e.g., `blueiris.svc.zz` or `homeassistant.svc.zz`.
For SSL I just run my own CA.
https://tools.ietf.org/id/draft-ietf-dnsop-private-use-tld-0...
> are thought to be plausible choices for the implementation of private namespaces
[ISO3166 clause 8.1.3] "User assigned code element":
"If users need code elements to represent country names not included in this part of ISO 3166, the series of letters AA, QM to QZ, XA to XZ, and ZZ, and the series AAA to AAZ, QMA to QZZ, XAA to XZZ, and ZZA to ZZZ respectively and the series of numbers 900 to 999 are available."
This is not the argument you think that it is.
> zz is safe for personal use. Those guidelines will not change
Right. Safe for personal use within the range of uses for ISO 3166—guaranteed not to collide with any future two-letter country code. It's not a commitment from ICANN, which remains free to say, "ISO 3166 guarantees no collisions for AA. We choose, therefore, to open up bidding to auction off aa, which is expected to fetch a pretty penny as the first of a limited set of possible TLDs that are < 3 characters long."
To pick your own free TLD just run a nameserver check against the TLD on [1] and watch out for TLDs that hit root servers
Still pissed that apple was straight up allowed to usurp that tld instead of something like .mdns.local or .autoconf
Also, please dont use .com/net/org for local networks. All you are going to do is punish yourself when you go to setup you AD domain. However if you want to setup a subdomain that you are willing to make the AD server authoritative for you may end up with less pain. If you have to use your own domain keep in mind that if you go to setup AD in your home/lab/small biz you will need to add records for your webserver/mailserver etc since AD will want to be the authoritative dns server for its domain. There are ways around this, but I digress. Using a public tld can cause pain, just be aware of that.
Everything inside the k8s homelab uses subdomains of k.myvanitydomain.com. The minecraft proxy is at mc.k.myvanitydomain.com. So, to connect to the "valinor" minecraft server, it's just valinor.mc.k.myvanitydomain.com. Dead simple (to me).
I tried explaining that to my kids and suddenly I knew what it was like for whoever explained to me the whole /ls/<chubby_cell>/borg/<borg_cell>/bns/<mdb_user>/<job_name>/<index> setup from google prod
However, running split-horizon DNS is not straightforward, at least in a home setting. I don't see a huge problem with putting a couple of internal addresses in external DNS servers.
lexicon cloudflare --auth-token $(gopass cloudflare) create my-real-domain.xyz A --name my-rpi --content 192.168.1.201In theory you could set up a small home server or dev machine script that pulls in a wildcard certificate and let all the real A/AAAA queries go to your LAN DNS server (or resolve through mDNS!). A record that doesn't resolve in global DNS won't usually cause much trouble in local DNS either.
Putting internal IP addresses in your DNS could pose problems for (small) companies using this trick (because it allows hackers to map out your network) and it could cause confusion (when systems reverse-lookup domains and suddenly a spoofed 10.0.0.1 address is shown as myfunkyservice.sigjuice.xyz in the log files). The issues are minor and unlikely to be a problem, but they're there to serve as footguns years down the line.
How will an A/AAAA query from something like https://my-rpi.my-real-domain.xyz resolve using mDNS?
All DNS queries go to my LAN DNS server by default. I don't particularly care that I can't create A/AAAA records on my LAN DNS server (which is a Time Capsule, btw) to keep the queries inside.
To me, the potential leakage of internal addresses/names is an acceptable tradeoff for the convenience.
Btw, how is a reverse DNS lookup ever going to do what you mention? I am not creating any PTR records anywhere.
I 100% agree that the whole reason for this setup is my LE cert. For whatever reason, some of my internal services with self-signed certs are not usable with Chrome, and some are. I don't know what pushes Chrome over the edge so it won't let you override. So I set up an internal reverse proxy with nginx to front-end all my internal services, then I only have to worry about keeping the LE cert installed in one spot.
I run DNSMasq on port 53, to serve DHCP and local DNS queries. DNSMasq forwards queries it can't answer (queries for "real" domains) to Unbound on port 1053.
It's not split horizon, because Unbound only serves the LAN - I don't serve DNS to the world - and because Unbound isn't an authoritative nameserver. But it's not that hard to make DNSMasq serve zones, and it's not hard to make DNSMasq serve those zones only to queries from the intarwebs, and serve the DHCP 'zone' to local queries.
And anyway, I guess you could use something ugly like BIND instead of Unbound, if you need an industrial-grade authoritative DNS server facing the internet.
Heh. I starred this Android feature request and kind of regret it because it's been a continuous stream of "+1" emails (but I want to stay subscribed in case some meaningful conversation happens at last):
https://issuetracker.google.com/issues/140786115
(A login is required; any Google account will do)
It sets the DNS domain correctly via DHCP, unlike a lot of routers.
It's (probably not) optimal, but it works. It was pretty much the same approach i used with PiHole/AdGuard Home.
Edit: To allow multiple hostnames i use a wildcard certificate from LetsEncrypt, though once i'm connected through VPN it doesn't matter much as it will resolve the internal hostname just fine.
So I could make foo.mylocal.com point to 127.0.0.1 or the printer, or anything else really.
For fee paying networks, the "router" will most likley be in charge of some sort of DNS. If thats the case its made canonical for a subdomain that one owns. If you're lazy, just plain split horizon. However limit it strictly to DHCP. As soon as you start re-writing public services, you're sunk.
Side note, its a really good time to start putting in location data into subdomains. using option 60(might not be this, its been a while) you can work out what switch the request came from and add a different subdomain based on that you can make subdomains like server01.rack3.datacenter.country.company.com. this allows you to make search params to create local services. ie "time" would first check rack3, then datacenter, then country, then company.
* router.home.arpa * nas.home.arpa * printer.home.arpa * htpc.home.arpa
With all new gTLDs it’s easy to have a collision when someone buys the “router” TLD.
mDNS is probably sufficient for most people and you don't need to setup old school DNS on a local network. (But if you do, a purpose-built TLD like home.arpa is a good choice.)
* [rfc6761](https://datatracker.ietf.org/doc/html/rfc6761)
> DNS clients may defer the resolution of .local spTLDs to the system’s mDNS resolvers instead of its DNS resolver.
This is not true. First off: You can always misconfigure your DNS resolver, but usually they can be used in parallel. Multicast DNS usually is only used when your router is too stupid to manage the hostname; and if multicast DNS is active on every host, then it's a setting that fixes even that broken router.
Also, "hostname.local" will never conflict with DNS based service discovery [1] of resolving a host via multicast DNS. And even if so, you can just use one of the other reserved multicast addresses and be done with it.
As long as you don't use e.g. "._tcp." or "._udp." inside your hostname, you never have domain name conflicts.
I think there's also a huge misconception about what DNS-based service discovery is.
In DNS-SD, there are questions to a service identifier with a PTR inside, and the response contains A,AAAA,SRV and TXT entries to describe everything you need to know to make a connection to the correct host, ip, port and version of the service.
Airprint, airplay, airscan and others additionally use their service name as a prefix in regards to the IANA-registered service names [2] so printers, scanners and other Multicast-DNS compatible hardware never conflicts with the existing network.
/ragecomment
Personally, I would actually embrace the use of .local, because it allows you to build a self-discovery service that is unrelated to DHCP and unrelated to ARP mechanisms, and works peer-to-peer; as long as the IPs are in the same NAT or, with IPv6/UDP6, have at least one discoverable scope.
In DNS-SD, you literally just have to be able to reach other IPs, and you have a working handshake mechanism to discover other devices without having to know their hostnames, IPs, or anything. It's pretty amazing once you realize its network automation potential.
Source: Me, building a web browser that uses peer-to-peer TLS encryption on "username._stealth._tcp.tholian.network" and "username._stealth._tcp.tholian.local" [3]
[1] https://www.ietf.org/rfc/rfc6763.txt
Some Linux distributions erroneously resolve it to 127.0.0.1, but there’s no RFC or consensus around this TLD.
(This can either be your normal domain name that you already have, using split DNS to make more things resolve on the internal network, or an entirely separate domain name, whichever is operationally easier for you.)
I bet many homes have more money for domain names than some shops/offices.
Just wondering why they didn't call it 'localnet' or some other unused synonym for local.
(RFCs are published by the IETF who manages the .arpa TLD. That’s one of the few TLDs not managed by ICANN for historical reasons. The .home TLD falls under ICANN’s root domain, so the RFC shouldn’t have assigned it.)
OpenWRT: *glances aside nervously*
> domains at all, but should network operators decide to do this, the
> following top-level domains have been used on private internal
> networks without the problems caused by trying to reuse ".local." for
> this purpose:
This is hardly ‘reserved’. It just describes existing practice without in any way designating it as safe, recommended or future-proof.
So if they won’t give us a tld to use, just use that :)
https://datatracker.ietf.org/doc/html/draft-wkumari-dnsop-in...
(Though maybe it's not a great name for this particular application, it seems to make a lot of sense for enterprise level infrastructure)
They bound it to a sub domain of the company's main web site claiming that Microsoft (maybe something with Active Directory? Or Azure?) doesn't support any domains that you don't actually own.
I wouldn't be surprised if this is false because the people in charge of the domains think GoDaddy is awesome. Would love to hear an HN expert tell me if they're full of crap or not.
There might be silent assumptions everywhere what domain addresses answer to, in log collection, in monitoring, in address management tools. Simple things like domain search strings becomes harder. Any non trivial enterprise is going to have a ton of these (semi-)automated tools that your address will end up in.
It also carries the risk of complicating future work. The company might merge with another company. Or imagine a mandate where all communication will need to switch to TLS, only to discover there are addresses used under other domains internally.
There are some more reserved domains in RFC 6761 (https://datatracker.ietf.org/doc/html/rfc6761) though:
- .test (Application software SHOULD NOT recognize test names as special, and SHOULD use test names as they would other domain names. [...] Caching DNS servers SHOULD recognize test names as special and SHOULD NOT, by default, attempt to look up NS records for them, or otherwise query authoritative DNS servers in an attempt to resolve test names. Instead, caching DNS servers SHOULD, by default, generate immediate negative responses for all such queries.)
- .localhost (Users are free to use localhost names as they would any other domain names. Users may assume that IPv4 and IPv6 address queries for localhost names will always resolve to the respective IP loopback address.)
- .invalid (Users are free to use "invalid" names as they would any other domain names. Users MAY assume that queries for "invalid" names will always return NXDOMAIN responses. Name resolution APIs and libraries SHOULD recognize "invalid" names as special and SHOULD always return immediate negative responses. Name resolution APIs SHOULD NOT send queries for "invalid" names to their configured caching DNS server(s).)
- .example, .example.com, .example.net (Users SHOULD understand that example names are reserved for use in documentation.)
Unfortunately, none of these address the same needs as .internal would.
Is the RFC assuming that there is only one loopback address for each protocol? That may be true for IPv6, but in IPv4 the entire 127.0.0.0/8 range is reserved for loopback. You can bind services to addresses anywhere in that range ("ip addr add 127.0.0.100/8 dev lo; nc -l 127.0.0.100 1234") which can only be accessed through that specific loopback address. So is this saying that .localhost domains must always resolve to some loopback address in IPv4 queries, or to 127.0.0.1 in particular?
There was a proposal to do something similar for IPv6 (using a 1::/32 prefix[0]) but it doesn't seem to have advanced much since 2013.
[0] https://tools.ietf.org/id/draft-smith-v6ops-larger-ipv6-loop...