Enable DNS cache

danielgoepp

Member
Mar 7, 2022
10
1
8
I feel this is an obvious question, but I just want to make sure I'm both understanding what I'm seeing correctly and that I follow recommended best practices. I mostly run Ubuntu as my servers (also Debian based) and for DNS cache it natively has systemd-resolved enabled. On some of my servers I disable that and run dnsmasq. I don't necessarily want to do that on my PVE servers thought (I try to minimize how much I modify them under the covers). I checked and it seems systemd-resolved is not enabled, is that correct? I'm getting zero DNS caching currently, and I would like to. I mean, I could just enable it, is that the recommended method? What do other folks do for DNS caching? Thanks.
 
Got a pair of highly available OPNsense VMs with unbound running as local DNS servers. Every guest uses these and unbound is caching, so no need that all my guests would need to cache DNS too.
 
Got a pair of highly available OPNsense VMs with unbound running as local DNS servers. Every guest uses these and unbound is caching, so no need that all my guests would need to cache DNS too.
Thanks for your thoughts, but that is not a solution that would solve my issue. I too run redundant DNS servers (pfsense and pi-hole), both of which cache. In this case though too, the authoritative DNS is in fact the pfsense.

I know I don't need to cache, but I would prefer to. It's mostly local DNS that I'm talking about anyway. There is no reason for my PVE servers to lookup the hostname of my local influxdb server every time it needs to write metrics to it. I know, I could also use IP addresses, but I prefer to use DNS if I can. It's not a traffic nor performance issue, it's more just a best practices thing. I would prefer to not do a lookup every single time from PVE.
 
Related too was that I had the same issue with Node-RED running on docker. For some reason it wasn't honoring the local systemd-resolved service, so I disabled it and replaced it with dnsmasq to cache for all my docker containers.
 
Well, not what I wanted to do, but I just put a static entry in the hosts file to calm down the queries. Annoying, but I guess will work for now. It would be nice if there was either built in DNS caching for PVE, or some recommended best practices for installing unbound, dnsmasq, etc in a supported way.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!