I need to build a custom simple non-authoritative caching DNS server in C/C++. Any guidance? Links? Samples?
A cache-only server is a server that is not a master server for any zone other than the in-addr.arpa. domain. A cache-only server handles the same kind of queries from clients that authoritative name servers perform. But the cache-only server does not maintain any authoritative data itself.
I wrote a basic DNS server for a job interview under BSD license.
May be someone could find it useful:
https://github.com/tomasorti/dns-server
If you really need to do that (it is a huge work, see Alnitak's reply), start from an existing good program (not a one-man experiment unmaintained for a long time like djbdns) and modify it.
Unbound is probably a reasonable choice for this. (The code base is smaller than BIND's one.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With