Block adverts on all devices

in #internet7 years ago


Hello all, I hope you are all doing well


Firstly I want to start off by saying I am not against adverts being used on webpages, everybody needs to earn a living, however recently it seems the bigger sites are using more adverts than ever. Using any device recently inspired me to write this post to at least try and help to some degree alleviate that frustration, whilst you feel as though your browser is grinding to a halt due to all those lovely advertisements trying to get you to part with your money, your information, or ultimately both. All the while consuming your bandwidth


This is much worse on mobile devices, or so it seems in to me


This will NOT work if you are using 3G 4G


You will need


My old trusty dusty Pi


  1. Raspberry Pi and a SD card 8GB is plenty, my Pi is ancient it just needs to able to run Raspbian lite, SD card compatability with the Pi can be a pain so if you run in to issues and errors this is most likely the cause or something has been corrupted
  2. SSH enabled but not essential, SSH client such as PuTTY
  3. Internet connectivity, I use Ethernet and SSH for ease
  4. Copy and paste a few commands, minimum of one needed

You need a keyboard and monitor for these steps, you don't need internet access to the Pi at this point. So if like me you tend to plug everything in to one monitor that's too far for a Ethernet to reach, or you haven't got a spare wireless adaptor. These next steps will come in handy

If you haven't got a copy of Raspbian you can download a image from raspberrypi.org, you will also need to put that image on your SD card. Several programs are available to do this

When your pi has prompted for you for a login the default user will be pi and the password will be password

Run raspi-config to change default password and enable SSH

under peripherals there should be option for SSH enable this, make sure you select finish to be sure the changes are applied

sudo poweroff

At this time I chose to move my Pi next to my router and connected via ethernet


Obtain the IP of the Pi, it will show in your connected devices on your routers home page. Make a note of this

Get your SSH client connected

Once you've logged in

We are now going to install pi-hole it's really good at preventing adverts, the only way to see how effective it is to give it a go. I personally will be donating to this in the near future. The project is located at pi-hole.net and can be installed with just one command

curl -sSL https://install.pi-hole.net

You should see something like

then after a little longer

Make sure you enable the admin access during the setup so you can keep a tab of what's been blocked. (if you are interested that is)

On the routers setting the DNS needs to equal the Pi's IP

Should look something similar to

And Done! DHCP needs to be enabled as far as I believe, but any device that connects to the router will now have the ads stripped from the web pages. Saving your valuable user experience along with bandwidth, if you think about it hard enough to a small scale you are reducing carbon footprint!

Its possibly the simplest install ever as it can be done with just the single line of code, also everything itself is guided throughout the setup.

I found out about pie-hole sometime last year, and feel it's too good not to share.


A brief browse of the internet after installing Pi-Hole. About 2 sites in all honesty

Hope this helps out some people, much love to the people that made this and the people that read this

Peace 


Sort:  

Congratulations @criticalblaze! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!