{"id":27256,"date":"2017-01-19T19:26:12","date_gmt":"2017-01-19T17:26:12","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=27256"},"modified":"2017-01-19T19:26:12","modified_gmt":"2017-01-19T17:26:12","slug":"block-unwanted-advertisements-with-etchosts-file-on-linux","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2017\/01\/19\/block-unwanted-advertisements-with-etchosts-file-on-linux\/","title":{"rendered":"Block unwanted advertisements with \/etc\/hosts file on Linux"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>Back in the old days, before the browsers even had extensions like <a href=\"https:\/\/adblockplus.org\/\">Adblock Plus<\/a>, many of us &#8211; tech-savvy web surfers &#8211; used to block unwanted advertising, SPAM sites, and other non-sense using the \/etc\/hosts file. \u00a0The technology behind is very simple &#8211; you overwrite the IP address to which the unwanted website&#8217;s domain name resolves with a loopback IP address (127.0.0.1). \u00a0Whether you do it on your own machine or at a home\/office proxy server is irrelevant. \u00a0And it worked magic!<\/p>\n<p>Turns out, people still use this technique today. \u00a0 I came across <a href=\"http:\/\/www.putorius.net\/2012\/01\/block-unwanted-advertisements-on.html\">this article<\/a>, which shows how to use a rather extensive list of domains for all sorts of online madness, collected and maintained by kind folks at\u00a0<a href=\"http:\/\/winhelp2002.mvps.org\/\">http:\/\/winhelp2002.mvps.org\/<\/a>.<\/p>\n<p>I tried it out of pure curiosity and sure enough it does what it says. \u00a0I&#8217;ve reverted back to Adblock Plus a couple of days later though, as random sites were breaking here and there. \u00a0I think this might be related to different adblock-detectors that many sites employ these days. \u00a0Also, some of the ads use things like embedded scripts or buttons, which might render JavaScript errors, preventing the rest of the page from loading.<\/p>\n<p>But if you&#8217;ve never tried it, I strongly recommend giving it a go.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>Back in the old days, before the browsers even had extensions like Adblock Plus, many of us &#8211; tech-savvy web surfers &#8211; used to block unwanted advertising, SPAM sites, and other non-sense using the \/etc\/hosts file. \u00a0The technology behind is very simple &#8211; you overwrite the IP address to which the unwanted website&#8217;s domain name &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2017\/01\/19\/block-unwanted-advertisements-with-etchosts-file-on-linux\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Block unwanted advertisements with \/etc\/hosts file on Linux<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Block unwanted advertisements with \/etc\/hosts file on Linux #WebWork #SPAM #ads #Linux","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,62,1334],"tags":[1186,20,314],"keyring_services":[],"class_list":["post-27256","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-technology","category-web-work","tag-advertising","tag-browsers","tag-spam"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":26379,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/08\/26\/steven-black-hosts-files\/","url_meta":{"origin":27256,"position":0},"title":"Steven Black hosts files","author":"Leonid Mamchenkov","date":"August 26, 2016","format":false,"excerpt":"StevenBlack\/hosts repository: Extending and consolidating hosts files from a variety of sources like adaway.org, mvps.org, malwaredomains.com, someonewhocares.org, yoyo.org, and potentially others. You can optionally invoke extensions to block additional sites by category. Categories include: adware, malware, gambling, porn, and social networks.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13251,"url":"https:\/\/mamchenkov.net\/wordpress\/2010\/08\/19\/ad-ctr-ratio-by-browser\/","url_meta":{"origin":27256,"position":1},"title":"Ad CTR ratio by browser","author":"Leonid Mamchenkov","date":"August 19, 2010","format":false,"excerpt":"Download Squad attempts to analyze a recent report about advertising click-through rate (CTR) ratio based on different browsers. \u00a0Apparently, more than 40 million impressions were used as the data for this report, and Opera and MSIE users came on top - they click the most ads. \u00a0Firefox and Chrome users\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2010\/08\/browser_ad_ctr-500x305.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":25969,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/03\/24\/blocking-the-adblock\/","url_meta":{"origin":27256,"position":2},"title":"Blocking the AdBlock","author":"Leonid Mamchenkov","date":"March 24, 2016","format":false,"excerpt":"CommitStrip nails it. \u00a0That's exactly what I do when the site is forcing me to disable the AdBlock extension.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"adblock","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2016\/03\/adblock-500x475.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":212,"url":"https:\/\/mamchenkov.net\/wordpress\/2003\/05\/06\/w3m\/","url_meta":{"origin":27256,"position":3},"title":"w3m","author":"Leonid Mamchenkov","date":"May 6, 2003","format":false,"excerpt":"I was doing plenty of browsing with my new affection - w3m web browser. Firstly, It doesn't need to be compiled by any Red Hat Linux user, since it's in the distribution already. Of course, I've found that out after I compiled it and built the RPM. Secondly, it behaves\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9498,"url":"https:\/\/mamchenkov.net\/wordpress\/2005\/09\/26\/daily-del-icio-us-bookmarks\/","url_meta":{"origin":27256,"position":4},"title":"Daily del.icio.us bookmarks","author":"Leonid Mamchenkov","date":"September 26, 2005","format":false,"excerpt":"Shared bookmarks for del.icio.us user tvset on 2005-09-25 Hacking Firefox: Navigation and Tab Browsing Tagged as: article browsers configuration firefox howto mozilla reference tips tricks NOOFS -- Network Object Oriented File System Tagged as: databases filesystems linux networking ONLamp.com: RMS: The GNU GPL Is Here to Stay Tagged as: concepts\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11595,"url":"https:\/\/mamchenkov.net\/wordpress\/2009\/06\/19\/browser-facts-from-microsoft\/","url_meta":{"origin":27256,"position":5},"title":"&quot;Browser facts&quot; from Microsoft","author":"Leonid Mamchenkov","date":"June 19, 2009","format":false,"excerpt":"Google Blogoscoped brings to our attention Microsoft's Browser Comparison chart. This is an excellent marketing campaign.\u00a0 I am a big fan of using humor in the advertising, and this is a good example of it.\u00a0 Everyone who has every tried to build a web page knows how horrible the state\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2009\/06\/time_breakdown_of_modern_web_design.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=27256"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/27256\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=27256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=27256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=27256"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=27256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}