{"id":429,"date":"2011-03-27T19:27:32","date_gmt":"2011-03-27T14:27:32","guid":{"rendered":"http:\/\/linuxndme.com\/?p=158"},"modified":"2011-03-27T19:27:32","modified_gmt":"2011-03-27T14:27:32","slug":"dns-cache-poisoning-with-dnscache-and-tinydns","status":"publish","type":"post","link":"https:\/\/blog.nixwind.com\/?p=429","title":{"rendered":"DNS cache poisoning with dnscache and tinydns"},"content":{"rendered":"<p><strong>Overview<\/strong><\/p>\n<p>DNS cache poisoning to redirect a site to alternate address using dnscache and tinydns<\/p>\n<p><strong>Requirements <\/strong><\/p>\n<ul>\n<li>Centos ( or any other Unix\/Linux ) Server running dnscache and tinydns<\/li>\n<li> Atleast 1 configured IP address on which dnscache\/tinydns is running :: Let it be 192.168.1.2<\/li>\n<li>A domain that we want to redirect :: Let it be exampledomain.com<\/li>\n<\/ul>\n<p><strong>Configuration<\/strong><\/p>\n<p><strong>Step 1<\/strong><\/p>\n<p>Install tinydns and dnscache, click on below links for help<\/p>\n<ul>\n<li><a href=\"http:\/\/linuxndme.com\/tinydns-installation-and-setting-up-a-domain\">Tinydns<\/a><\/li>\n<li><a href=\"http:\/\/linuxndme.com\/external-dns-cache-and-resolver-using-djbdns\/\">Dnscache<\/a><\/li>\n<\/ul>\n<p><strong>Step 2<\/strong><\/p>\n<p>Add the site you want to direct to dnscache as below, so that it will look up the IP inside<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span>echo &#8220;192.168.1.2&#8221; &gt; \/etc\/dnscache\/root\/servers\/exampledomain.com <\/strong><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Make records for the domain on tinydns to redirect it to the desired address ( here i&#8217;m pointing it to 192.168.1.2 itself )<\/p>\n<p><strong><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> cd \/etc\/tinydns\/root\/ <\/strong><br \/>\n<strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> add-ns ns1.exampledomain.com 192.168.1.2<\/strong><br \/>\n<strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> add-host exampledomain.com 192.168.1.2<\/strong><br \/>\n<strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> make <\/strong><\/strong><\/p>\n<p><strong>Step 3<\/strong><\/p>\n<p>Kill and restart the services and bring the changes into effect<\/p>\n<p><strong><span style=\"color: #3ea99f;\">root@serv:~# <\/span> svc -t  \/service\/*<\/strong><\/p>\n<p>With this the machines that are using 192.168.1.2 as dns server will get pointed to the IP 192.168.1.2 when accessing exampledomain.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview DNS cache poisoning to redirect a site to alternate address using dnscache and tinydns Requirements 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 192.168.1.2 A domain that we want to redirect :: Let it be exampledomain.com [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[66,104,69],"tags":[67,68,103],"_links":{"self":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/429"}],"collection":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429"}],"version-history":[{"count":0,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}