This tool will help you to automate adding blocked domain by DNS Nawala to the hosts file.
- Program will run in daemon mode, and act as DNS server, so user need to change DNS server to localhost (127.0.0.1)
- When user request a domain, the program will forward the request to Nawala, if the return address is 114.127.223.16 (CHECK) then the domain is blocked.
- The program then request the actual address using DNS over REST and added it to hosts file.
- That's it!
- Change your DNS Server to localhost, *nix environment is located in /etc/resolv.conf
nameserver 127.0.0.1
- Run it (need to be root)
$ sudo python anti-nawala.py
User needs to compile/ install the program, and it's only works for localhost. Still need to figure a way to use it as SaS/ Cloud.
This program might work as well for other DNS filtering like OpenDNS, but we need to know the characteristic from it, for example nawala will return address 114.127.223.16 (CHECK) if the domain is blocked.