<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
My dnsmasq.conf consists of the single line:<br>
<br>
<tt>conf-dir=/etc/dnsmasq.d</tt><br>
<br>
...and I keep a number of config files in /etc/dnsmasq.d - one for
general config options, another for DHCP options, a third for static IP
allocations (including by MAC address via DHCP), etc. So just dropping
a new 'adservers' file into /etc/dnsmasq.d and restarting it will cause
the new list to be picked up.<br>
<br>
Also has the advantage that if a misguided package upgrade also
'upgrades' my dnsmasq.conf file, I can restore normal operation very
easily ;)<br>
<br>
-- Paul<br>
<br>
Don Muller wrote:
<blockquote cite="mid:00d601cad6ac$84c40bc0$8e4c2340$@com" type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <div
 style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:dnsmasq@lists.bod.org">dnsmasq@lists.bod.org</a>
[<a class="moz-txt-link-freetext" href="mailto:dnsmasq@lists.bod.org">mailto:dnsmasq@lists.bod.org</a>] <br>
  <b>Sent:</b> Wednesday, April 07, 2010 6:14 PM<br>
  <b>To:</b> Don Muller<br>
  <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><br>
  <b>Subject:</b> Re: [Dnsmasq-discuss] Add blacklist feature<o:p></o:p></span></p>
  </div>
  </div>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">It's possible to do this without modifications
today. I'm
using a cron job:<br>
  <br>
  <tt><span style="font-size: 10pt;">#!/bin/sh</span></tt><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><br>
  <tt>wget --quiet --output-document=/etc/dnsmasq.d/adservers \</tt><br>
  <tt><a moz-do-not-send="true"
 href="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&amp;showintro=0&amp;mimetype=plaintext&amp;useip=127.0.0.1">"http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&amp;showintro=0&amp;mimetype=plaintext&amp;useip=127.0.0.1"</a></tt><br>
  <tt>/etc/init.d/dnsmasq restart</tt></span><br>
  <br>
If you use a different source for the blacklist, a little sed or awk in
necessary to reformat the list, but it just so happens that the
adservers list
is available natively in dnsmasq format.<br>
  <br>
Not to say that adding some blacklist functionality to dnsmasq doesn't
have its
plus points, of course. Though I think I'd rather the implementation
stays with
a single cache and adds a flag to mark an entry as 'evil', than another
cache
is added solely for that purpose. I'd like to see RBLs supported too
(is that
what you meant by 'blacklist servers'?).<br>
  <br>
-- Paul<br>
  <br>
p.s. BTW, are you aware of the web content filtering features OpenDNS
provides?
guess it depends what kind of blacklisting you're seeking.<br>
  </p>
  <pre>&nbsp; <o:p></o:p></pre>
  <p class="MsoNormal"><span
 style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Hi Paul,<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Very
nice. How do you reference the
adservers file in the dnsmasq.conf file?<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Yes I
mean RBLs when I said
blacklist.<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Don<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  </div>
  </div>
</blockquote>
<br>
</body>
</html>