Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Self hosted DNS server that responds to queries with data from web API?
2 points by ghoshbishakh on May 13, 2023 | hide | past | favorite | 5 comments
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!



I have trouble understanding the question, but have you started by evaluating e.g. Unbound?

https://unbound.docs.nlnetlabs.nl/en/latest/


Thank 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


I 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.


PowerDNS 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.


I'd just make something myself, not too difficult




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: