3 ms·
Ask HN: Self hosted DNS server that responds to queries with data from web API?
Hi HN community,
I'm looking for an open source DNS server that can respond to queries by fetching data from a web API that I will configure. I came across Technitium DNS Server, but I haven't tried it yet and I'm not sure if it meets our requirements.
Our goal is to scale https://pinggy.io horizontally, and to achieve this, we need a DNS server that can respond to queries with data from a database. Ideally, the DNS server would forward the query to a web API that we will create, and the web API will respond with the DNS response.
Do you know of any open source DNS servers that can do this? Any recommendations or tips would be greatly appreciated.
Thank you in advance!
- KomoD 3y agoI'd just make something myself, not too difficult
- jruohonen 3y agoI have trouble understanding the question, but have you started by evaluating e.g. Unbound? https://unbound.docs.nlnetlabs.nl/en/latest/ https://unbound.docs.nlnetlabs.nl/en/latest/
- ghoshbishakh 3y agoThank you for sharing this. But after a scan through the docs I am not sure if the Dns server can fetch the response from an api. Sorry for not making the question clear. I want this kind of flow: The dns server gets a query. The dns server makes that query to a web api using a get request like /resolve/myawesomedomain.com The web api responds { "A": 10.10.10.10 } The dns server responds with that A record
- jruohonen 3y agoI don't know existing tools for this kind of a task, but I think it wouldn't be that hard to write your own solution.
- detaro 3y agoPowerDNS can do that. That said, I'd seriously consider an architecture that pushes the data to the DNS server proactively instead of making it query the API when requests come in.