How did DNS management get so messed up on distros? A rant.

reddit

When I started with this whole UNIX in the 90s, where KISS ruled, and almost all DNS was a line or two in resolv.conf. About ten years ago, something changed. Part of the problem were the "improvements" of systemd, and no matter how one feels about systemv vs. systemd, that's only PART of the problem.

For example, I had to take over a bunch of development build machines which write firmware for government hardware. Al these systems have about 5-6 different versions of Ubuntu, Debian, Fedora, and RedHat/CentOS that span the last 12 years. Some are *forced* to be legacy distros because the manufacturer of the build systems only work with a specific version of a distro. Don't ask me why, that's the specs I deal with. All their instructions range from some stripped down version of CentOS 4 on "see supplied VMDK" to the latest Ubuntu Focal Fossa 20.04 off Vagrant. And not one goddamn one of them has the same way to do two simple things:

  1. What DNS servers am I using?
  2. How do I add custom ones?

Right now I am in Ubuntu Server hell because starting with Precise Pangolin –and try saying Ubuntu names with a straight face to a board of directors, especially "On Bionic Beaver, we ran into some problems…"– but also, just the simple act of putting in custom DNS changes. PLUS, the desktop version is DIFFERENT than the server version, which is different than the one on docker, which is different even on AWS versions, making a lot of online howtos in places like Ubuntu Wiki and Stackexchange a minefield of nmcli, systemd-resolve –status, cloud.yml, dnsmasq, dhclient.conf, blah blah blah/head, or ../tail … it's all different. It might work on yours, it might not? Wait, you DON'T have NetworkManager on your AWS image? Try nmcli… no? How about /etc/systemd/resolved.conf? In interfaces? Wait, that's a cloud thing, isn't it? Where they keep resetting your hostname too? Like /etc/netplan/50-cloud-init.yaml? Wait, do you HAVE netplan on here?

At some point, some clowns with a few loose ganglia tried to grow a brain and took the relatively simple "put it in resolv.conf" and suddenly had that point only to 127.0.01:53, or some localhost version thereof, which blinds the system admin forced to work with these as to what servers are actually being looked at to resolve things upstream. And then tacks on a vague warning "DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN" but not by what, or why, or how to stop it other than "check resolveconf manpage" and… resolvconf is not installed. You gotta figure out some fucking voodoo upstartd, resolvconf, or systemd command and grep out the work "Servers" with a capital S and hope they are right.

Look, I don't care if ya'll, in some goddamn consortium, decide to put it in /lib/system-junk/dnsfuckery/upstart/resolve.dns.custom-except-cloud/the-princess-is-in-another-castle.yml or some other path, but SOMEBODY PICK A STANDARD and STICK WITH IT because I am sitting here on a Sunday night with my balls between my ears trying to:

  1. Find out what DNS servers this system is using?
  2. How do I add custom 2 private DNS servers?

It changes from distro to distro, version to version, and is even different in the SAME version in some vagrant box, AWS image, docker image, of desktop CD that came free with my Atari Enthusiast magazine.

What happened to the UNIX philosophy of "make a tool do one thing, and do it well?" It's just a goddamn DNS server, probably still one of THE most important parts of the Internet, and everyone is kicking it around like you're all using some hamonous DHCP joining hand-to-hand in some universal love and kindness that frankly, does not exist in any enterprise I have ever worked with, and made something that used to be simple, and universal, and treats it like, "oh, what? Now you want CUSTOM DNS? What are you, some kind of lunatic?"

How did we all go so horribly awry?

submitted by /u/punkwalrus
[link] [comments]