{"id":22,"date":"2014-01-20T15:06:27","date_gmt":"2014-01-20T15:06:27","guid":{"rendered":"http:\/\/googleglass.my\/blog\/?p=22"},"modified":"2014-01-21T01:39:19","modified_gmt":"2014-01-20T17:39:19","slug":"i-defeated-dns-hijack","status":"publish","type":"post","link":"https:\/\/gri.my\/blog\/i-defeated-dns-hijack\/","title":{"rendered":"Defeated DNS hijack"},"content":{"rendered":"<h1>Prelude<\/h1>\n<p>My dorm&#8217;s ISP Extreme Broadband network\u00a0hijacks all DNS queries internally and answer them as if it came from the outside, even if you explicitly\u00a0wanted to use external servers.<\/p>\n<p><a href=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-32\" alt=\"2\" src=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/21.png\" width=\"471\" height=\"143\" srcset=\"https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/21.png 471w, https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/21-300x91.png 300w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><\/a><\/p>\n<p>You could easily see that it is hijacking DNS requests, and is resolving to OpenDNS&#8217;s IPs. OpenDNS has the habit of hijacking non-existent domains to their search page. Our ISP<!--more-->\u00a0partnered with OpenDNS and features their little logo at the search pages.<\/p>\n<p><a href=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-38\" alt=\"4\" src=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/4.png\" width=\"548\" height=\"262\" srcset=\"https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/4.png 548w, https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/4-300x143.png 300w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/a><\/p>\n<p>I don&#8217;t really care if they hijack requests, to hell if they want to know what site I visit, the main problem that I cannot stand is that during peak time, their DNS servers dies and become non-responding. All you get is timeouts, websites stall and look broken. I have complained, asked them to stop hijacking and allow queries to be solved externally if they do not wish to do something about their DNS server. They don&#8217;t seem to care, so I say a big fuck you and did my own contraception of anti-hijack.<\/p>\n<h1>Say Hello to DNSMASQ and ACRYLIC<\/h1>\n<p>I happen to have a VPS lying around, so I decided to use it as a DNS forwarder. DNSMASQ is both a DHCP and DNS server. On the VPS,<br \/>\nall you need to do is<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\napt-get install dnsmasq\r\n\r\n<\/pre>\n<p>Then<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\nnano \/etc\/dnsmasq.conf\r\n\r\n<\/pre>\n<p>and uncomment the port parameter and add a port number other than 53. After that just<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\nservice dnsmasq restart\r\n\r\n<\/pre>\n<p>You now have your private DNS server at your service.<\/p>\n<p>On a Windows 8\u00a0machine, it is impossible (as it seems) to change the DNS query port. So the best you could do is setup a local DNS proxy and point the proxy to your recently setup DNS server.<\/p>\n<p>Download <a href=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/Acrylic.7z\">Acrylic<\/a>, unzip it and put it somewhere. You have to change the <code>PrimaryServerAddress<\/code> and <code>PrimaryServerPort<\/code>\u00a0inside the <code>AcrylicConfiguration.ini<\/code> file to your setup&#8217;s values. After that, just start the proxy.<\/p>\n<p>Then point Windows to 127.0.0.1 for DNS queries and verify.<\/p>\n<p><a href=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-35\" alt=\"3\" src=\"http:\/\/googleglass.my\/blog\/wp-content\/uploads\/2014\/01\/3.png\" width=\"677\" height=\"178\" srcset=\"https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/3.png 677w, https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/3-300x78.png 300w, https:\/\/gri.my\/blog\/wp-content\/uploads\/2014\/01\/3-672x178.png 672w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/a><\/p>\n<p>Nice one eh? Well this assumes that your ISP is not bastard enough to do packet analysis. If your ISP is that bastard, perhaps you could try <a title=\"DNSCRYPT\" href=\"http:\/\/dnscrypt.org\/\" target=\"_blank\">DNSCRYPT<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prelude My dorm&#8217;s ISP Extreme Broadband network\u00a0hijacks all DNS queries internally and answer them as if it came from the outside, even if you explicitly\u00a0wanted to use external servers. You could easily see that it&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-technical"],"_links":{"self":[{"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/posts\/22","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/comments?post=22"}],"version-history":[{"count":9,"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":42,"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/posts\/22\/revisions\/42"}],"wp:attachment":[{"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/media?parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/categories?post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gri.my\/blog\/wp-json\/wp\/v2\/tags?post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}