Is there some API that I can use to build a simple DNS server, preferably in Java? All I want my DNS server to do is answer with the same IP address for any request.
+2
A:
The DNS protocol is fairly simple, all you need is the ability to catch UDP requests. Once you've captured the request you would then use the appropriate response, or iterative/recursive methods to get unfamilar DNS records. [That requires prior knowledge of DNS servers]
JDNSS may be what you are looking for. It is hosted on SF and it is opensource.
monksy
2009-11-13 05:20:43
The DNS protocol is simple??? Either you are a Programming God or you know little about the DNS. Seeing the number of broken DNS software, I believe that the DNS protocol is NOT simple (first example: you mention only UDP while DNS als runs over TCP).
bortzmeyer
2009-11-17 15:59:29
It can be done with both, typically it is done with UDP. The protocol for DNS is simple.
monksy
2009-11-17 17:06:47
TCP is used with DNS mainly for zone transfers, not for queries; queries use UDP. The complex aspects of DNS involve things like caching, support for recursive queries, support for multiple query types, notifications, etc. If you want to respond to all queries with the same answer and don't care about zone transfers, then it's not too bad.
RickNZ
2009-11-23 01:52:27
+1
A:
If all you need is a DNS server returning the same IP address to every request, you can use Simple DNS Plus with the "Fixed IP Address" plug-in. See http://www.simpledns.com/kb.aspx?kbid=1261
Jesper
2009-11-13 12:35:03