Here’s an interesting solution to the problem.
Disclaimer - I don’t have this set up. I learned of it last night from a friend who does. I have an unused Pi+ laying around, that I tried to use as a TV box. It was too slow for that, replace it with a Roku.
Block Millions Of Ads Network-wide With A Raspberry Pi-hole 2.0
http://jacobsalmela.com/block-millions-ads-network-wide-with-a-raspberry-pi-hole-2-0/
The Pi-hole can block ads for all devices on your network. All you need is a Raspberry Pi connected to your router. It was inspired as a low-cost, open source alternative to the AdTrap. The Pi-hole works on the the B, B+ and Pi 2 (it can also run on the Zero, but you need a micro-USB-to-Ethernet adapter)
Block Over 1.6 Million Ad-serving Domains (And More)
Currently, over 1.6 million (if you decide to use the mahakala source list) domains known to serve advertisements can be blocked before they even reach your computer. The list of these domains are maintained by different sites across the Internet. The Pi-hole queries these sites and compiles them into an aggregated list, which is then stored on the Raspberry Pi to block advertisements.
Anytime a Website wants to load something from a domain on the list, it is redirected back to the Pi, so the real server is never contacted. This can not only speed up your Web browsing, but it will also reduce your bandwidth usage because your browser is not downloading the ad from the server.
You’ve created a proxy. There are plenty of open source solutions that do the same thing. Look up Squid for a great open source proxy that does web filtering on the fly for your whole network.