"...For when you are in a bind..."
A very simple, zero-config emergency DNS server. Use this if you want to answer some DNS queries, but relegate the majority of the work to a (real) upstream server.
npm install emergency-dns-server -g
ednsd -p 5500 -u 126.96.36.199 www.mysite.com:a:188.8.131.52 boo.com:mx:10.0.0.1
This will set up the emergency DNS server to listen on port 5500,
and to answer
A queries for
www.mysite.com with the IP
MX queries for
boo.com with the IP
10.0.0.1. All other requests will be proxied to the upstream
If you don't provide a
ednsd will startup on port 53 as
usual. But note, you'll have to be root to do that.
If you want to change/build this thing from scratch, you'll need one additional prerequesite --- IcedCoffeeScript. Get it like so:
npm install iced-coffee-script -g
And then you can build by running:
from the top directory. The file
./cmd.js is hand-written,
but everything else in
lib/ is generated from a
found in the
You can supply
-U <user> and
-G <group> to have
setgid respectively. This is good for security
if you are running as root and binding to port 53.