{"id":1192,"date":"2018-07-01T15:10:33","date_gmt":"2018-07-01T15:10:33","guid":{"rendered":"\/blog\/?p=1192"},"modified":"2018-07-01T15:10:33","modified_gmt":"2018-07-01T15:10:33","slug":"adblocking-for-ddwrt","status":"publish","type":"post","link":"\/blog\/index.php\/adblocking-for-ddwrt\/","title":{"rendered":"Adblocking for DDWRT"},"content":{"rendered":"<p>Save Startup Script<br \/>\nCode: <\/p>\n<p>_rogue=0.0.0.0<br \/>\necho -e &#8220;n=1\\nwhile ! wget -q -O \/tmp\/hsts http:\/\/winhelp2002.mvps.org\/hosts.txt ; do\\n\\t[ \\$n -gt 5 ] &#038;&#038; break\\n\\tlet n+=1\\n\\tsleep 60\\ndone\\ngrep \\&#8221;^0.0.0.0\\&#8221; \/tmp\/hsts | grep \\&#8221;^0.0.0.0\\&#8221; | grep -v localhost | awk &#8216;{print \\&#8221;$_rogue\\\\\\t\\&#8221;\\$2}&#8217; | tr -d &#8216;\\\\\\015&#8217; >\/tmp\/dlhosts\\nrm \/tmp\/hsts\\nkillall -HUP dnsmasq&#8221; >\/tmp\/wh<br \/>\nsh \/tmp\/wh &#038; <\/p>\n<p>Put Additional DNS Masquerade option:<br \/>\naddn-hosts=\/tmp\/dlhosts <\/p>\n<p>cronjob<br \/>\n0 12 * * * root \/tmp\/.rc_startup<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Save Startup Script Code: _rogue=0.0.0.0 echo -e &#8220;n=1\\nwhile ! wget -q -O \/tmp\/hsts http:\/\/winhelp2002.mvps.org\/hosts.txt ; do\\n\\t[ \\$n -gt 5 ] &#038;&#038; break\\n\\tlet n+=1\\n\\tsleep 60\\ndone\\ngrep \\&#8221;^0.0.0.0\\&#8221; \/tmp\/hsts | grep \\&#8221;^0.0.0.0\\&#8221; | grep -v localhost | awk &#8216;{print \\&#8221;$_rogue\\\\\\t\\&#8221;\\$2}&#8217; | tr -d &#8216;\\\\\\015&#8217; >\/tmp\/dlhosts\\nrm \/tmp\/hsts\\nkillall -HUP dnsmasq&#8221; >\/tmp\/wh sh \/tmp\/wh &#038; Put Additional DNS Masquerade option: addn-hosts=\/tmp\/dlhosts [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1192","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1192"}],"version-history":[{"count":1,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1192\/revisions"}],"predecessor-version":[{"id":1193,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1192\/revisions\/1193"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}