Linux - NewbieThis forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Wow, I didn't mean to start a flame war. Sorry, guys!
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.
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..
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!
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.
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.
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.
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.
Last edited by unSpawn; 06-25-2009 at 06:37 AM..
Reason: more *is* more.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.