Jun
09
2015
Removing Ads with your PowerDNS resolver

In my previous post , I documented my notes on setting up a new PowerDNS Recursor for our own clients.

In this post, I will present a simple way to reduce unnecessary traffic by blocking every FQDN you dont want.

 

 

Download a well known custom HOSTS file:


# wget -c http://winhelp2002.mvps.org/hosts.txt -O /etc/pdns-recursor/hosts.blocked

Add your FQDNs you want to block,


eg.
0.0.0.0 facebook.com

be very careful not to block something you need.
Reminder: No support for wildcards, only FQDNs

 

Edit your /etc/pdns-recursor/recursor.conf to support the new hosts file:


etc-hosts-file=/etc/pdns-recursor/hosts.blocked
export-etc-hosts=on

restart your pdns and test it


# dig www.facebook.com @localhost

;; ANSWER SECTION:
www.facebook.com.   86400   IN  A   0.0.0.0

Once you have done that, you can edit your hosts.blocked when ever you want!
But dont forget to reload:


# rec_control reload-zones
Tag(s): PowerDNS
Feb
22
2013
ebalaskas: RT @dazo #RedHat’s #KVM…
Nov
28
2012
ebalaskas: voted for “Arch”
Nov
28
2012
ebalaskas: any screenshots ?

identica.pngany screenshots ?

from Updates from ebalaskas on Identi.ca!

Nov
28
2012
ebalaskas: RT @gapan !Salix !Xfce…

identica.pngRT @gapan !Salix !Xfce 14.0 has been released: http://bit.ly/YjYJVh

from Updates from ebalaskas on Identi.ca!

Nov
08
2012
ebalaskas: RT @hackerspacegr Σήμερα στις…

identica.pngRT @hackerspacegr Σήμερα στις 19.00: OpenWrt Users Meetup 0007 http://tinyurl.com/bphfm7c

from Updates from ebalaskas on Identi.ca!

Oct
31
2012
ebalaskas:
Oct
12
2012
ebalaskas: Copying Is Not Theft…
Oct
12
2012
ebalaskas: I have changed my…

identica.pngI have changed my index page to honor Dennis MacAlistair Ritchie. http://balaskas.gr/ We havent forgotten you.

from Updates from ebalaskas on Identi.ca!

Oct
04
2012
ebalaskas: RT @erkanyilmaz ” HSTS…

identica.pngRT @erkanyilmaz " HSTS is supported in Google #, # 4, and the popular NoScript Firefox extension”

from Updates from ebalaskas on Identi.ca!

Oct
04
2012
ebalaskas: goodbye #http, hello #hsts…
Oct
04
2012
ebalaskas: RT @samatjain python-sha3: C-based…

identica.pngRT @samatjain python-sha3: C-based !Python module implementing new SHA-3 "Keccak" hash http://ur1.ca/ah41b

from Updates from ebalaskas on Identi.ca!

Oct
03
2012
ebalaskas: #vim wrapper for editing…

identica.png# wrapper for editing # zone files http://ur1.ca/agy0u

from Updates from ebalaskas on Identi.ca!

Sep
28
2012
ebalaskas: Vim English-Greek Spell Dictionary…

identica.pngVim English-Greek Spell Dictionary http://ur1.ca/afjqo

from Updates from ebalaskas on Identi.ca!

Sep
24
2012
ebalaskas: On a 1TB sata2…

identica.pngOn a 1TB sata2 disk: # yes > yesfile # shred yesfile is something you can do … if you have a gazillion years of free time !

from Updates from ebalaskas on Identi.ca!

Sep
20
2012
ebalaskas: openssl x509 -in <(openssl…

identica.pngopenssl x509 -in <(openssl s_client -connect google.com:443) -noout -enddate #

from Updates from ebalaskas on Identi.ca!

Sep
13
2012
ebalaskas: The Computer Language Benchmarks…

identica.pngThe Computer Language Benchmarks Game http://ur1.ca/b834

from Updates from ebalaskas on Identi.ca!

Sep
05
2012
ebalaskas: Hackerspace.GR

identica.pngHackerspace.GR http://ur1.ca/a48qe just a few words about hsgr. Plz read it and RT it

from Updates from ebalaskas on Identi.ca!

Sep
05
2012
ebalaskas: How many hours have…

identica.pngHow many hours have your disk been Powered On ? sudo smartctl -a /dev/sda | grep Power_On_Hours

from Updates from ebalaskas on Identi.ca!

Sep
04
2012
ebalaskas: Archers, plz dont forget…

identica.pngArchers, plz dont forget to add yourself to ArchMap http://ur1.ca/8buwt #

from Updates from ebalaskas on Identi.ca!