Skip to content
DNS server configured using redis. Based on iriscouche's dnsd.
ApacheConf JavaScript Shell
Find file
Latest commit 91faa9f @colmsjo colmsjo Added docker config
Failed to load latest commit information.
bin Minor fix in start script
etc/init
src-docker Added docker config
test
.gitignore
COPYING
Dockerfile Added docker config
Gruntfile.js Initial release
LICENSE Added license and fixed package
README.md
package.json
redis-dns-config.json.template Initial release
server-old.js
server.js

README.md

Introduction

A NodeJS DNS server that is configured using Redis. Names not found in redis are looked up in Google's DNS server (8.8.8.8).

Installation

Pre-requisite:

  • NodeJs
  • Redis server

Make sure to setup DNS correctly on the hosts where you want to use this DNS server. Check /etc/resolv.conf if you're running on unix. In windows, check the network settings in the control panel.

Install: npm install --production

Copy redis-dns-config.json.template to redis-dns-config.json and update with your settings. Start the server: node server.js

Test the setup

Start with setting up some hosts with their IP:s in redis (make sure redis is installed an running)

redis-cli set redis-dns:dbserver.redis-dns.local 10.0.0.1
redis-cli set redis-dns:appserver.redis-dns.local 10.0.0.2

We can use dig for testing purposes. This does not require that we change the DNS of the machine we are using for the tests since we can use an alternate port in dig.

Should give 10.0.0.1: dig @localhost -p 5353 dbserver.redis-dns.local A

Should give empty answer: dig @localhost -p 5353 dbserverrrr.redis-dns.local A

Should give empty answer: dig @localhost -p 5353 dbserver.redis-dns.local MX

Docker setup

Build an image: docker build --rm -t redisdns .

Start a container:

docker run -d -p 5353 --name redisdns redisdns
Something went wrong with that request. Please try again.