node package manager


OLODUM olodum logo

/etc/host made easy.

Tired of editing your /etc/host ? Olodum act as a local filtering DNS proxy :

  • every DNS request containing a domain name that is configured to be catched will returned the IP you specify,
  • every other request will be forwarded to your real DNS servers

Why olodum ? Because i'm a fan of Michael. Just look at the video clip "They don't care about us"


NodeJS >= v0.4 (

Modules installation

Olodum should be used and installed globally

[sudo] npm install olodum -g

Supported env

  • linux (ubuntu,debian)
  • macosx
  • that's all

windows port in the TODO list


sudo olodum [host1] [host2] [-t target]

where :

  • host1, host2 are the filters, default to blank (=> every DNS requests are catched). Can be a part of a hostname
  • target is the IP address to respond when a domain name matches host, default to
  • if target is not an IP then target is first resolved to an IP address (before olodum is started)

sudo is needed to bind to local port 53 (DNS server)

You should be able to surf as usual, except for the filtered domain name(s). When you are finished, just type Ctrl + C to exit and revert to the previous and original DNS configuration of your box.

Use cases

/etc/host replacement

When developping proxy, web or cache servers, inserting lines in /etc/host can quickly be cumbersome and boring. You've got plenty of commented lines, don't know if your configuration is up to date regarding one of the domain names your are testing, you're doing host and dig to find real IPs to put in this file, ... Just use Olodum !

Want to serve a new site ? Just start your local webserver and use :

sudo olodum -t

Want to map on to see if goog uses vhosts ? Just use :

sudo olodum -t

wildcard domain names

If you've got wildcard domain names to point to one IP, you need to enter each line in your /etc/host With olodum, just use the fixed portion of the domain name in the filter :

sudo olodum google

In this example, every DNS request containing google will be answered with (default IP). It's equivalent to these lines in /etc/host :
[.... snip ....]


When you're setting up a proxy, a cache, a CDN or even better, a frontend optimizer for your live servers and you want to test if their configuration is ok, instead of using one of the provider IP, use the future used CNAME as the target for olodum :

sudo olodum -t

and you're ready to go and test your fasterized website !

blackhole webperf test

Imagine a world where facebook, google+ or twitter widgets were 100% uptime ... Huh ?! So, test your website with olodum activated for one of these domains and see the result on the loading time of your site !

sudo olodum twitter

temporary AdBlocker

Start a web server on

sudo node -e "require('http').createServer(function(req,res) {res.end('')}).listen(80)"

Start olodum

sudo olodum

Hahaha ! bye-bye crappy AdServers !

(Starting the web server will be included in future version of olodum, list of adServers too.)


sudo npm test

Tests are not complete, must work on it and use Mocha.


Not compliant with AAAA (IPV6) records.

Inner working


  1. read and backup /etc/resolv.conf
  2. write a new /etc/resolv.conf with as the DNS server
  3. start the DNS server
  4. serve DNS responses based on filter or forward the request to the first DNS server detected in /etc/resolv.conf


  1. read and backup /etc/resolv.conf
  2. change the network configuration with as the DNS server
  3. start the DNS server
  4. serve DNS responses based on filter or forward the request to the first DNS server detected in /etc/resolv.conf


  • windows port
  • AdBlocker & blakchole management based on blacklists
  • regex on host
  • tests


This module is based on these dns library for nodejs : and (no more maintained, this fork is more up-to-date :


Do what you want. Have fun with JS.