full image - Repost: PVE-Leazzard - A DNS/DHCP server for Proxmox with automatic generation of DNS records (from Reddit.com, PVE-Leazzard - A DNS/DHCP server for Proxmox with automatic generation of DNS records)
Mining:
Exchanges:
Donations:
https://ift.tt/CNaty4c this chilly winter day, I want to wish you all happy holidays and share a little invention I came up with for my home lab.I’ve always been fascinated by home infrastructures built like DevOps dreamlands - everything declarative, neat, and packed with cool features. But there’s this fine line where the effort and time invested stop making sense, especially when you’re working full-time, and your home lab is just a hobby. Over time, compromises pile up.For the longest time, I relied on static IPs and occasionally added manual DNS entries for every new service I launched. You know that feeling when you stumble upon a crazy-cool self-hosted service and think, "OMG, I need to try this"? Fast forward, and you’ve forgotten half the services, but the DNS records are still sitting there while the IPs aren’t reused. The lab keeps growing, and one day you decide to overhaul the network - split networks, create isolated VLANs, or something equally dramatic. That’s when the nightmare begins. Static IPs everywhere, sprinkled with forgotten DNS entries. You just sit there, overwhelmed by the scope of it all, imagining your family complaining about the Plex server being down.This holiday season, I had an idea: why not create a dynamic DNS service to ditch static addresses in most cases and automate domain management? I didn’t want a bulky DNS server that would require extra scripting. The idea was simple: hand out addresses via DHCP within a specific domain and auto-generate static records when needed. The server would also “get” when a VM or LXC container switches between static and DHCP.Here’s what I tackled while figuring it out:Proxmox API woes: Initially, I wanted to pull static IP info using cloud-init configs or qemu-guest-agent. But the agent’s API calls were painfully slow - 2-3 seconds per VM! So I ditched that.Efficient updates from Proxmox: I needed a way to track changes without hammering the API. The solution? ARP monitoring. It’s almost perfect, but not without quirks:If a server switches from DHCP to static without changing its IP, ARP won’t reflect it.If a server disappears from ARP, you can’t be sure if it was deleted or just powered off.Short lease times weren’t an option either, as they’d flood the network with unnecessary DHCP traffic. So, alongside ARP, I added periodic checks.Keep it simple: The system needed to have as few moving parts as possible - just two, in fact: a dns/dhcp server and a monitoring script. Fewer components mean fewer failure points.The result is a small app I call PVE-Leazzard (from “lease”), working with dnsmasq. It’s a prototype, but it gets the job done. I’d love to hear your thoughts on this setup. How do you manage your networks and IP space?Link to repo: https://ift.tt/Wlx6z8c: https://www.youtube.com/watch?v=CGoHqqH4Ak8
Social Media Icons