4 ms·
Yeah, I've been using localhost domains on Linux for a while. Even on machines without systemd-resolved, you can still usually use them if you have the myhostna
by jchw 2y ago
Yeah, I've been using localhost domains on Linux for a while. Even on machines without systemd-resolved, you can still usually use them if you have the myhostname module in your NSS DNS module list.
https://www.man7.org/linux/man-pages/man8/libnss_myhostname.so.2.8.html https://www.man7.org/linux/man-pages/man8/libnss_myhostname....
(There are lots of other useful NSS modules, too. I like the libvirt ones. Not sure if there's any good way to use these alongside systemd-resolved.)
- aib 2y agoI ended up writing a similar plugin[1] after searching in vain for a way to add temporary DNS entries. The ability to add host entries via an environment variable turned out to be more useful than I'd expected, though mostly for MITM(proxy) and troubleshooting. 1: https://github.com/aib/nss-userhosts https://github.com/aib/nss-userhosts