Here is a brief abstract of the following 7,000-ish phrases for folk who hate the factor recipe websites do the place the authors babble about their private lives for pages and pages earlier than attending to the cooking: This text is about the right way to set up bind and dhcpd and tie them collectively right into a purposeful dynamic DNS setup on your LAN in order that DHCP shoppers self-register with DNS, and also you at all times have working ahead and reverse DNS lookups. This text is meant to be half one among a two-part sequence, and partially two, we’ll mix our bind DNS occasion with an ACME-enabled LAN certificates authority and arrange LetsEncrypt-style auto-renewing certificates for LAN providers.
If that appears like a enjoyable couple of weekend initiatives, you are in the suitable place! If you wish to fast-forward to the place we begin putting in stuff, skip down a few subheds to the tutorial-y bits. Now, excuse me whereas I babble about my private life.
My title is Lee, and I’ve an issue
(Hello, Lee.)
I’m a tinkering homelab sysadmin endlessly chasing the enterprise dragon. My understanding of what “regular” means, when it comes to the issues I ought to have the ability to do in any minimally functioning networking setting, was fashioned within the days simply earlier than and simply after 9/11, once I was a fledgling admin recent out of faculty, working at an unlimited firm that made planes beginning with the quantity “7.” I tutored on the knees of an entire bunch of various mentor sysadmins, who ranged on the graybeard scale from “pretty regular, simply writes his personal customized GURPS campaigns” to “lives in a Unabomber cabin within the woods and can solely talk by way of GPG.” If there was one constant chorus all through my childhood marinating in that enterprise IT soup, it was that ahead and reverse DNS ought to at all times work. Why? As a result of identical to a clear toilet is mostly an indication of a pleasant restaurant, having good, purposeful DNS (ahead and reverse) is an indication that your IT group is aware of what it is doing.
Simply take a look at what the plenty should cope with outdoors of the datacenter, the place insanity reigns. Take a look at the state of the common consumer’s LAN—is there even a search area configured? Do reverse queries on dynamic hosts work? Do ahead queries on dynamic hosts even work? How can anybody dwell like this?!
I made a decision way back that I did not should, so I’ve maintained a linked bind and dhcpd setup on my LAN for greater than ten years. Additionally, I’ve management points, and I like my dwelling LAN to operate just like the well-run enterprise LANs I used to spend my days administering. It is type of like how automotive individuals assume: Should you’re not driving a stick shift, you are not likely driving. I’ve the identical type of dumb hang-up, however for community providers.
Truthfully, although, operating your LAN with bind and dhcpd is not even that a lot work—these two functions underpin an enormous a part of the trendy Web. The packaged variations that include most trendy Linux distros are able to exit of the field. They definitely beat the pants off of the minimal DNS/DHCP providers supplied by most SOHO NAT routers. After getting bind and dhcpd configured, they’re bulletproof. The one time I work together with my setup is that if I want so as to add a brand new static DHCP mapping for a number I wish to at all times seize the identical IP handle.
So, hey, if the thought of getting excellent ahead and reverse DNS lookups in your LAN sounds thrilling—and, come on, who does not need that?!—then pull up your terminal and strap in as a result of we’re going make it occur.
(Notice that I am relying a bit on Previous Lee and this old blog entry for among the explanations on this piece, so if any of the three individuals who learn my weblog discover any similarities in among the textual content, it is as a result of Previous Lee wrote it first and I’m completely stealing from him.)
However wait, there’s extra!
This piece is meant to be half one among two. If the thought of getting one’s personal bind and dhcpd servers sounds a bit of foolish (and it isn’t—it is superior), it is really a prerequisite for an extra future undertaking with severe sensible implications: our personal totally functioning native ACME-enabled certificates authority able to answering DNS-01 challenges so we are able to subject our personal certificates to LAN providers and never should cope with TLS warnings like plebes.
(“However Lee,” you say, “why not simply use actual-for-real LetsEncrypt with an actual area on my LAN?” As a result of that is significantly extra difficult to implement if one does it the suitable approach, and it means doubtlessly coping with split-horizon DNS and hairpinning if you happen to additionally want to make use of that area for any Web-accessible stuff. Cut up-horizon DNS is useful and helpful when you have necessities that demand it, however if you happen to’re a house consumer, you most likely do not. We’ll preserve this so simple as potential and use LAN-specific DNS zones quite than actual public domains.)
We’ll deal with all of the certificates stuff partially two—as a result of we have now a methods to go earlier than we are able to get there.