Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Ad blocking for all devices on your network  (Read 3749 times)

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Ad blocking for all devices on your network
« on: March 25, 2016, 09:42:56 PM »

[Note : I'm really unsure where to post this - it involves browsers, networks, Raspberry Pi, Linux... please move if I've chosen the wrong place]

There's been a few security scares recently around ads in web pages, unscrupulous people can game the advert marketing system such that very reputable websites are caused to carry malicious ads that may infect your computer with malware.

Whilst I understand and appreciate the reason for ads being there, some websites are almost unusable because of the sheer number of obscuring ads.

For a long time I've been using adblocker in Chrome, which works very well.  However, it does slow down browsing a little bit.  It also needs to be installed on each device, so won't automatically work on tablets, phones etc on your network.

I read recently about Pi-Hole, a network wide ad blocker that runs on a Raspberry Pi.  It's really quite clever, certainly speeds up browsing, perhaps doesn't block everything as well as adblocker does.

As it's network-wide, it redirects known ad-sites to a blank local image - the ads are never downloaded, the website loads much faster from any device accessing your local network.

It also gives some nice stats on it's server page (see attached image)

If you've got a spare Raspberry Pi, I think it's worth trying out - and I'd be interested what others think of it.

This is the website for it (it's free) https://pi-hole.net/

but installation is really simple :

Download the latest Raspbian-Lite from Raspberry Pi website, put it on SD card and boot the pi with it.

Type
Code: [Select]
curl -L install.pi-hole.net | bash
Answer the questions in the setup script (you need to give the Raspberry Pi a fixed ip address)

Then either configure each computer/device on your network to use the Pi-Hole Raspberry Pi as a DNS server with it's fixed ip address, or change the DNS servers list on your router such that DHCP tells all your devices to use Pi-Hole for the DNS server.

It's still being developed, at the moment it doesn't auto-update itself, and I'm not clear if it even auto-updates the blacklist and whitelists of websites it should block (I occasionally run the shell script to do this manually).

I like it, and you might too, if you like tinkering  ;D

Ian
Logged

Chrysalis

  • Content Team
  • Addicted Kitizen
  • *
  • Posts: 7382
  • VM Gig1 - AAISP L2TP
Re: Ad blocking for all devices on your network
« Reply #1 on: March 25, 2016, 10:12:12 PM »

interesting find, I personally have a domain blacklist on my router, although I am currently working on switching it to a squid filterer so I avoid blocking url's needed for sites to function.

Ad blocking I am aware of the implications for sites that rely on revenue for their income, but I feel this has only come about because too many sites post abusive ad's that go beyond what is reasonable and of course not to mention now the fairly frequent amount of ad serving companies getting compromised.
Logged

loonylion

  • Reg Member
  • ***
  • Posts: 723
Re: Ad blocking for all devices on your network
« Reply #2 on: March 26, 2016, 11:58:53 AM »

I could run adzapper on my smoothwall for the same effect.

As someone quite involved with websites, I think it's only fair for me to point out that the abusive ads aren't always the site's fault. ads are generally run by a third party ad agency, which sell traffic to companies wanting to advertise. It's generally the company buying the traffic from the ad agency that's responsible for abusive ad behaviour, often even the ad agencies themselves aren't aware it's happening, and if informed will generally terminate the ad causing the problem.
Logged

jelv

  • Helpful
  • Kitizen
  • *
  • Posts: 2054
Re: Ad blocking for all devices on your network
« Reply #3 on: March 26, 2016, 01:12:21 PM »

@sheddyian

I hope you've excluded these forums from the blocking!
Logged
Broadband and Line rental: Zen Unlimited Fibre 2, Mobile: Vodaphone
Router: Fritz!Box 7530

sheddyian

  • Kitizen
  • ****
  • Posts: 1159
    • My Shed Blog
Re: Ad blocking for all devices on your network
« Reply #4 on: March 26, 2016, 01:47:42 PM »

I've only just started playing with blacklisting and whitelisting sites or domains, but it does give you the opportunity to do so.

Found some curious oddities (possibly down to the large list of blacklisted domains)

Email from hotmail in Windows Live Mail program wouldn't download - had to whitelist m.hotmail.com for it to work

Some blogspot sites have images blocked.  an image hosted on 1.bp.blogspot.com will load, hosted on 3.bp.blogspot.com won't load.  Whitelisting 3.bp.blogspot.com doesn't fix it.

[Edit 13:53]

This page explains how to do white or blacklisting https://pi-hole.net/faq/how-do-i-whitelist-or-blacklist-a-webiste-or-domain/

Code: [Select]
/usr/local/bin/whitelist.sh m.hotmail.com worked straight away to let Live Mail access my emails but
Code: [Select]
/usr/local/bin/whitelist.sh 4.bp.blogspot.com still blocked images hosted on that location.

However, following the instructions further down, I checked that 4.bp.blogspot.com was in /etc/pihole/whitelist.txt and then
Code: [Select]
sudo /usr/local/bin/gravity.sh modified the lists and it's now working.



Ian
« Last Edit: March 26, 2016, 01:56:08 PM by sheddyian »
Logged