Skip to main content

Ad blocking without browser extensions


Google is an advertising company first and foremost, lest we forget. They want to create ads people want to see, they say, but I find it hard to trust their motives. It comes as little surprise they want to clamp down on browser extension based adblockers as Ars recently covered.

Fortunately, there are other ways to block ads which are more effective anyway. Every OS has a hosts file, which is simply a plain text file that can route internet traffic from one host to another. In Linux and Mac OS X the hosts file is in /etc/hosts and in Windows it is in C:\Windows\System32\Drivers\etc\hosts and editing it will require sudo or Administrator rights.

Once you have your hosts file open, we are going to add a bunch of entries to it that will take traffic from many thousand known ad-serving domains and route it to 0.0.0.0 which is equivalent to a digital trash can. There are options for host file ad blocking. Personally, I use the list from mvps.org but the list from Steven Black looks even more comprehensive, and it is segregated out into the types of traffic you would like to block: unified hosts for ads, fake news, gambling, porn and social. Both of these lists are completely free of charge. What you want to do is get your list loaded into your browser, then select all and copy it to the clipboard. Next, simply paste the text into your hosts file. You may want to take a backup of the hosts file first, especially if you have existing entries that you will need to add back in. Once this is done, ad blocking will immediately take effect, no reboot or logout required.

Supposed you are on a device which does not allow access to the hosts file, like your phone or tablet. Sure, there are plenty of ad blocking apps which you could use, but I have found a better way. On your device you can change the DNS settings for WiFi connections. A simple google search will show you how to do this on iOS or Android. Armed with the knowledge of how to change this setting, you will need a primary and a secondary DNS server. There are several free DNS servers to use AdGuard is quite reliable and Alternate DNS has not failed me yet. In my setup, I use my primary server from one and secondary from another, just to keep them honest although this is not necessary.

In changing the DNS, we are still trusting someone else with our internet traffic and DNS hijacking is a real threat. How do we know our DNS server settings aren't being compromised? I use a router checker from F-Secure to verify the DNS settings. This tool is also free, and entirely online. It will give you an expanded view of your DNS settings if you wish, and its standard output is a simple Green/OK Red/NotOK. So there you have it, a completely free way to block ads, without relying on the browsers to not undercut their own business model!

What about when you're on the cellular networks from you phone or tablet, you ask? I have that figured out as well, but I'll save that for another day...

--Jay E. blogging for digitalinfinity.org

Comments

Popular posts from this blog

Operator Overload

Photo by Oliver Sjostrom
Life has changed dramatically since the start of the personal computer revolution in the late 1970s. We have seen computing go from the realm of military to industry, then to the home and now to the pocket of our pants. Connected computers have followed the same path, as the Internet has forever changed the landscape of computing, including how people interact with it. Along the way, we've seen computing go from being rather anti-social to being a completely mainstream component of popular culture.

Let's pause for a moment and examine how technology migrated into being chic. In the late 1970s there was a lot of optimism around what computing technology could someday do for us and while many people were eager to learn, that number was still small. Computers were essentially souped up calculators and most people weren't eager to learn an arcane programming language or spend their free time noodling around with calculations.

One pivotal use case for t…

Law enforcement and DNA sequencing

DNA sequencing has risen in popularity in recent years to to the widespread availability of affordable testing kits. Obviously people are opting into participation by uploading their DNA data, in great numbers, but do they fully know how that data will be used?

The Golden State Killer, who terrorized California from the mid-1970s to the mid-1980s, was recently apprehended by working with a lesser known testing company, Family Tree DNA. Their kits are smaller and so is their database, but their database has an big advantage. The company boasts that it has the largest database Y-DNA database in the world. Y-DNA is very useful in tracing patrilineal ancestry, which is essentially data on who you are related to. This data is how the Golden State Killer was caught. Because some of his relatives had willingly participated in DNA kit testing, law enforcement was able to triangulate his identity.

Use of these databases by law enforcement is a new but already rapidly growing phenomenon. Gene …

The Growing Disruption Of Artificial Intelligence

Photo by Frank Wang
Artificial intelligence may be as disruptive as the computers used to create it once were, and it could be even bigger. Given the disruption that social media has proven to be, one has to wonder if we are fully prepared for the life altering consequences we are building for ourselves.

IBM has been a key player in the artificial intelligence arena for over two decades. Deep Blue was their first tour de force in 1997, when its team of developers received $100,000 for defeating chess champion Gary Kasparov in a game of chess. That watershed moment has its roots all the way back in 1981 when researchers at Bell Labs developed a machine that achieved Master status in chess, for which they were awarded $5000. In 1988, researchers at Carnegie Melon University were awarded $10,000 for creating a machine that achieved international master status at chess. Deep Blue, however, was the first machine to beat the world chess champion.

Google has entered the fray as well, with th…