View Single Post
Old 23rd May 2014, 12:37 PM   #16
SaTaN
Member
 
SaTaN's Avatar
 
Join Date: Jun 2002
Location: Caulfield-ish
Posts: 4,758
Default

Quote:
Originally Posted by dragonFLAME View Post
Say what! This sounds too good to be true.
Do a search for dnsmasq adblock.

pretty much this:

1) install dnsmasq
2) edit some files in /etc/dnsmasq.d

I have 3 files:
00-setup
Code:
no-dhcp-interface=
#internode dns
server=192.231.203.132
server=192.231.203.3
# optus primary dns server
server=211.29.132.12
# optus secondary
server=198.142.0.51
# google
server=8.8.8.8
Fix the above to use your ISP/favorite dns servers. These are the fallback ones.

next up is 10-adblock which is a nice long list of "address=/naughty-server/127.0.0.1" lines.

That file is written to from a cron job which runs:
Code:
#!/bin/sh
wget "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext" -O /etc/dnsmasq.d/10-adblock

service dnsmasq restart
lastly (and the actual reason I bothered setting this up!) - 20-unblockus, so I can use unblock.us service without having to use them for all dns queries. Switching to a local resolver meant I dint get a 200+ms hit every time I did a dns query on my network.

Code:
strict-order
server=/pandora.com/208.122.23.22
server=/hulu.com/208.122.23.22
server=/cbs.com/208.122.23.22
server=/abc.com/go.com/208.122.23.22
server=/tv.com/208.122.23.22
server=/pbs.com/208.122.23.22
server=/vevo.com/fwmrm.net/208.122.23.22
server=/thewb.com/208.122.23.22
server=/cwtv.com/208.122.23.22
server=/crackle.com/208.122.23.22
server=/last.fm/208.122.23.22
server=/turntable.fm/208.122.23.22
server=/mog.com/208.122.23.22
server=/iheart.com/208.122.23.22
server=/netflix.com/208.122.23.22
server=/netflix.net/208.122.23.22
server=/nflximg.com/208.122.23.22
server=/nflxext.com/208.122.23.22
server=/api.wipmania.com/208.122.23.22
server=/sony.net/208.122.23.22
server=/lastfm.es/208.122.23.22
server=/unblock-us.com/208.122.23.22
Then I just set dhcp to set the correct DNS server and boom! netflix + no ads on my entire local network
SaTaN is offline   Reply With Quote