How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
catweazel
Level 10
Level 10
Posts: 3461
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to block block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby catweazel » Tue Oct 24, 2017 2:22 am

all41 wrote:hey catweasel how can you tell if it works?

doubleclick.net

Working...

Code: Select all

This site can’t be reached

doubleclick.net refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED


Not working...

Code: Select all

Realize what’s possible with digital

Connect with the right people, in the right moments, with DoubleClick's integrated solutions.
Put insights in your inbox
Get product news, case studies, industry reports and more, direct from DoubleClick and Google.


please don't plonk me


*PLONK*
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

User avatar
blockhead47
Level 2
Level 2
Posts: 59
Joined: Wed Jun 15, 2016 4:50 pm

Re: How to block block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby blockhead47 » Tue Oct 24, 2017 2:25 am

I also monitor MVPHosts and update my /etc/hosts file when a new version is posted.
As many of you I also have that process automated with a script.
I would not depend solely on browser based blockers. Other things, especially email might try
to reach out and touch a bad site. If /etc/nsswitch.conf is configured right, which it is by default,
my /etc/hosts file is there to give some measure of protection.

User avatar
all41
Level 11
Level 11
Posts: 3567
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby all41 » Tue Oct 24, 2017 10:02 am

ublock was already in control of double click.
*PLONK*
exactly--a predicted response.
Proud to be a supporter and monthly contributor to Mint.

User avatar
majpooper
Level 4
Level 4
Posts: 382
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby majpooper » Tue Oct 24, 2017 6:10 pm

Come on guy - it is just a suggestion - if you don't want to use it fine don't use it. Some of us happen to think it is and added layer of protection - we get it - you don't think it gets you anything of value. hoooah drive on.

User avatar
catweazel
Level 10
Level 10
Posts: 3461
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby catweazel » Wed Oct 25, 2017 1:08 am

all41 wrote:*PLONK*
exactly--a predicted response.

On the contrary. I tell porkies. Big ones. Often.
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

User avatar
BG405
Level 5
Level 5
Posts: 855
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby BG405 » Wed Oct 25, 2017 10:38 am

I think using the hosts file is a great idea and TBH I'd forgotten about it. Used to use it years ago in WinXP/7. It being browser-independant (and effective for all programs which can access the Web) is a good thing. Means not having to configure all the rules for each browser add-on. :)


syg00 wrote:I park a pi3 as a getway/router so the entire house can be protected

Home network filtering is something I intend to set up at some point but this won't offer any protection when out & about.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - LM17.3 KDE 32
Toshiba NB305 - LM17.3 Xfce 32--------------------K7S5A Athlon 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 -----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

User avatar
Flemur
Level 13
Level 13
Posts: 4631
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby Flemur » Wed Oct 25, 2017 11:07 am

BG405 wrote: Means not having to configure all the rules for each browser add-on.

Same with privoxy - just route the browser thru the proxy...or not, if you don't want to. I use the same setup for firefox and vivaldi/chrome.

I block so much advertising that it often breaks videos, so to see a "broken" video I just start a browser which doesn't use the proxy, which is trivially easy. If you're using the hosts file you'd have to switch between different copies of it, and (I think) restart your internet so it rereads the hosts file.

AND! If videos from news sites generally play OK, then you're NOT blocking enough advertising and tracking.

The "lightbeam" firefox addon is great for showing all the bogus sites some websites talk to - there are sometimes well over a hundred trackers and advertisers.
Xubuntu 17.10/fluxbox/pulse-less
Mint 18.2 Xfce/fluxbox/pulse-less
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?

User avatar
trytip
Level 5
Level 5
Posts: 855
Joined: Tue Jul 05, 2016 1:20 pm

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby trytip » Wed Oct 25, 2017 2:01 pm

the reason one might want the use of a hosts file is that this is system wide so even if a malicious script wants to use curl to download something hidden in the background it will be blocked. if you use noscript or ublock extensions you are only protected while using the browser

i use mpvhosts along with http://someonewhocares.org/hosts/

one trick though is that if you have ipv6 you will need to double the entry where 0.0.0.0 is ipv4 and ::1 is ipv6 so an example of blocking doubleclick.com is"

Code: Select all

0.0.0.0 doubleclick.com
::1 doubleclick.com


i convert all entries from 127.0.0.1 > 0.0.0.0

it was and still is frustrating to understand this at first but the more you learn the more you know and yes it does get rather frustrating trying to keep upfated but you can use a hosts 1 year old and still work pretty damm good since domain names don't change often
I love Windows, they give my walls personality.

User avatar
blockhead47
Level 2
Level 2
Posts: 59
Joined: Wed Jun 15, 2016 4:50 pm

Re: How to block ads, banners, 3rd party cookies, page counters, web bugs and hijackers

Postby blockhead47 » Wed Oct 25, 2017 3:56 pm

Thanks for the tip @trytip.
I forgot about the IPv6 addresses.
Updated my script to add those for each mvp host entry.


Return to “Tutorials”