700 Software
700 Software

Reputation: 87783

Simple DNS Server in Node.JS? (Primary/Authoritative DNS Server) (maybe ndns?)

Does anybody know of a DNS Server that is written in Node.JS? I am specifically interested in Authoritative DNS Servers (as opposed to caching DNS server).

The only thing this needs to do is to serve A, MX, TXT, SPF, SOA, NS records based on my own algorithm which I will write into a fork or clone of whatever I find to start with.

In fact I may not need all of those types of records. But the important thing is that it must work. I do not want to have DNS debugging issues. I am hoping (expecting) this will not be a problem because DNS is very simple (I have heard).

Is there anything in Node.JS I can start with? If you know that something has been used in production, then please let me know.


The Node.JS DNS Servers I have found are

If anyone is using one for production, I would like to know. So far they seem to be very scattered efforts.

Upvotes: 47

Views: 44999

Answers (6)

Ali
Ali

Reputation: 22317

After reviewing all available node.js DNS libraries, i found DNS2 to be one of the best available library in 2020 which is still maintained.

Some of its features:

  • Implementation in Pure JavaScript with no dependencies
  • Server and Client
  • Lot of Type Supported
  • Extremely lightweight
  • DNS over UDP, TCP, HTTPS Supported

https://github.com/song940/node-dns

npm install dns2

Upvotes: 8

Falci
Falci

Reputation: 1873

bns: DNS library, server, and validating recursive resolver for node.js, in pure javascript.

Upvotes: 3

The Digital Ninja
The Digital Ninja

Reputation: 1120

Check out https://github.com/tjfontaine/node-dns

Upvotes: 13

oshimin
oshimin

Reputation: 41

I found a DNS server write in node.js fun_dns the source is on github

Upvotes: 3

Jeppe Fihl-Pearson
Jeppe Fihl-Pearson

Reputation: 87

Since Java is okay for you, you could have a look at the Eagle DNS project. It is written in Java and supports both MySQL and file based stores for the records, and allow you to write your own module if that doesn't fit your needs: http://www.unlogic.se/projects/eagledns

Upvotes: 1

psema4
psema4

Reputation: 3047

Here's "a very basic authority server built with Node.js", in < 500 lines: dnsserver.js

Upvotes: 12

Related Questions