Re:Adblock via /etc/hosts
by IgorPartola on Friday February 12, 2016 @08:56AM
(#11087135)
Does anyone have a convenient way to convert this to a bind9 config format? I would rather run this for the whole LAN than just one computer at a time.
[ Parent
| on HN ]
> Does anyone have a convenient way to convert this to a bind9 config format?
If you use BIND RPZs, you can convert from /etc/hosts format to BIND zonefile format, (or just pump the new entries to nsupdate) which should be pretty trivial. Some information and useful links are in this comment and subsequent commentary. [0]
IMO RPZs are substantially easier to manage than an ever-growing set of master blackhole zones, especially when you have slave DNS servers.
You could use dnsmasq for your LAN. That way you can just use the hosts files as they are.
If it really has to be bind, check out this page for a tutorial on blocking using bind: http://www.malwaredomains.com/?page_id=6
Then just use awk to go from hosts file format to this: http://mirror2.malwaredomains.com/files/spywaredomains.zones
Hope that helps.