LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How To: Block All Internet Ads in Any Web Browser (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-block-all-internet-ads-in-any-web-browser-729149/)

BslBryan 06-11-2009 01:10 AM

Wow, I didn't mean to start a flame war. Sorry, guys! :o

Thanks, Ruler2112 for your kind words, and to everyone else, yeah, there are certainly easier ways to block ads. ;) I just found this hosts file and thought it was neat.

I might add in a little disclaimer that it's only for knowledge. I'm not recommending this tutorial, because there really are simpler ways of doing this, but there certainly isn't any harm in posting it here, or even following the steps.

Also, some people might find this comes in useful if they are using a very new, unstable browser that has no add-ons, etc. :)

EDIT: Just realized that the link to the hosts file has been modded out. :(
Anyway, thanks for reading, and I'm glad most of you seemed to enjoy it. I suppose it really is worthless now. :)

farslayer 06-11-2009 11:13 AM

Since Adblock was mentioned I'll throw in that the Untangle Gateway has adblock now, so it can do ad blocking for your entire network while it's sitting at the gateway. Plus all the other nifty features of the UTM device..

BeacoN 06-16-2009 02:02 AM

cool
 
I'm definitely one for knowing how to do something. many ways. This is yet another way to blacklist ip addresses from toturing you. Thanks for the post!

nowonmai 06-25-2009 04:11 AM

Quote:

Originally Posted by pwc101 (Post 3555755)
My understanding is having a huge hosts file slows down address lookups since every time you enter an address, your browser has to scan through 15,000 lines before realising www.google.com isn't a dodgy address. I may be wrong on this, but that is my understanding.

Not really... name lookups will have to do this anyhow for new domain names. For other, cacheable names, the browser will remember. For non cacheables (ads for instance) it will have to do the lookup every time, either in the hosts file or via DNS.

nowonmai 06-25-2009 04:14 AM

Quote:

Originally Posted by BslBryan (Post 3570070)
I just found this hosts file and thought it was neat.

And you're right, it is...

I, for one, am not a fan of loading layer upon layer of software on my network stack and/or browser. I really have no interest in privoxy, adblock and so on... they cause sluggishness, IMO.

This, simple, lightweight addition gives many of the benefits with little of the bloat.

H_TeXMeX_H 06-25-2009 04:32 AM

Quote:

Originally Posted by nowonmai (Post 3585704)
And you're right, it is...

I, for one, am not a fan of loading layer upon layer of software on my network stack and/or browser. I really have no interest in privoxy, adblock and so on... they cause sluggishness, IMO.

This, simple, lightweight addition gives many of the benefits with little of the bloat.

I'm betting a hosts file is a lot slower actually.

unSpawn 06-25-2009 05:21 AM

Quote:

Originally Posted by nowonmai (Post 3585704)
This, simple, lightweight addition gives many of the benefits with little of the bloat.

Since you say "gives many of the benefits" please explain how you would do this / block these using only your precious "simple, lightweight addition":
- incrementally update your blocklist,
- block ad-tracking cookies (for those using Firefox have a look at the www.ghostery.com plugin),
- block in-page ads residing in a path on the same server you visit,
- block ads from a hostname of which the domainname is the same as the server you visit,
- block ads presented through Javascript or Flash,
- block ads by host or path substring match,
- block only webbugs (you know, those tiny 1 pixel transparent images),
- set session-only cookies for a range of sites,
- selectively block popups, refresh-tags and redirects,
- keep images with specific sizes from displaying,
- block visiting domains based on content (like those parked sites).
Well, actually you don't need to try because you can't.
As such your "many of the benefits with little of the bloat" phrase can not based on reading (and actually understanding) what's been said in this thread already.


Also it turned out that the owner of the site where the hosts file resided is one of the Ubuntu people. That particular "hosts tutorial" got plastered over several web logs in the month it got posted here. Since this is not some radically new idea and the site owner does not make clear the content is not his but originates from mvps.org it must have been done purely for promotional purposes. He should have either linked to it or made clear it's not his work. File under plagiarism.

unSpawn 06-25-2009 05:40 AM

...and since this isn't about Linux Security I'll move it elsewhere.

XenaneX 08-04-2012 08:12 AM

Quote:

Originally Posted by unSpawn (Post 3585775)
...and since this isn't about Linux Security I'll move it elsewhere.

I have a suggestion.

jefro 08-04-2012 12:21 PM

"I'm betting a hosts file is a lot slower actually."

I have and still use some pretty huge hosts files. There were some versions of OS's and some browsers that didn't work correctly but they are all now faster than a dns lookup is (assuming your hard drive isn't from 1990).

To reverse the issue, you can put a hosts file with only the few sites that you use. Don't use any dns ip. There are some ad's that are on an ip so they will show. Not sure you can fully block all ads ever.

Sad we have to pay for this but it is also a choice to consider. http://www.opendns.com/home-solution...ntal-controls/

NyteOwl 08-04-2012 01:03 PM

using the hosts file this way is a very old trick. It still has it's uses but once it grows too large it can contribute some lag. And of course there are things it can't catch. But as a means of blocking specific IP's or host names it's fairly efficient, especcially for a short list.

I do have to chuckle at someone actually applying a licence of any kind to this as these lists have been around the net forever and are virtually all in the public domain. Trying to licence a particular list (which is undoubtedly a collation of other such lists strikes me as a bit over the top.

jefro 08-04-2012 02:03 PM

For many years I only could get a very slow dial up connection. It was usable on bulletin boards if you didn't mind paying long distance charges every night for a week to get a few floppies worth of data. When the internet took over I still had to use a text based browser. If you really want to speed up things you can try them. Once you get used to it, you wonder what the big deal is with other forms.
It may be that a person born into the web can't easily use a text based browser but at least try it.

unSpawn 08-04-2012 02:35 PM

FCOL not again...
 
Quote:

Originally Posted by jefro (Post 4745886)
Not sure you can fully block all ads ever.

Easy to test.


Quote:

Originally Posted by NyteOwl (Post 4745904)
(..) of course there are things it can't catch.

Yeah, likely the stuff you wouldn't encounter the past millennium.


http://www.linuxquestions.org/questi....php?p=3585760

jefro 08-04-2012 10:24 PM

I view the subject of ad's or unwanted content on a web page the same way I view OS/application security. I say my OS will be subject to an attack at some point no matter what I do. I can only limit my exposure. If you feel you have found some way to block content then there will be some new means to send junk to your browser. The worse offenders rely on new found holes in security. The really bad ones might get past any controls, because they know someone is trying to prevent them.

EDDY1 08-04-2012 10:54 PM

Quote:

Originally Posted by XenaneX (Post 4745750)
I have a suggestion.

Post the suggestion.


All times are GMT -5. The time now is 01:28 PM.