DNS cache poisoning to redirect a site to alternate address using dnscache and tinydns


  • Centos ( or any other Unix/Linux ) Server running dnscache and tinydns
  • Atleast 1 configured IP address on which dnscache/tinydns is running :: Let it be
  • A domain that we want to redirect :: Let it be exampledomain.com


Step 1

Install tinydns and dnscache, click on below links for help

Step 2

Add the site you want to direct to dnscache as below, so that it will look up the IP inside

root@serv:~# echo “” > /etc/dnscache/root/servers/exampledomain.com

Step 3

Make records for the domain on tinydns to redirect it to the desired address ( here i’m pointing it to itself )

root@serv:~# cd /etc/tinydns/root/
root@serv:~# add-ns ns1.exampledomain.com
root@serv:~# add-host exampledomain.com
root@serv:~# make

Step 3

Kill and restart the services and bring the changes into effect

root@serv:~# svc -t /service/*

With this the machines that are using as dns server will get pointed to the IP when accessing exampledomain.com