<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<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]-->
</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> dnsmasq@lists.bod.org
[mailto:dnsmasq@lists.bod.org] <br>
<b>Sent:</b> Wednesday, April 07, 2010 6:14 PM<br>
<b>To:</b> Don Muller<br>
<b>Cc:</b> Dnsmasq-discuss@lists.thekelleys.org.uk<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:10.0pt'>#!/bin/sh</span></tt><span style='font-size:
10.0pt;font-family:"Courier New"'><br>
<tt>wget --quiet --output-document=/etc/dnsmasq.d/adservers \</tt><br>
<tt><a
href="http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&amp;showintro=0&amp;mimetype=plaintext&amp;useip=127.0.0.1">&quot;http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&amp;showintro=0&amp;mimetype=plaintext&amp;useip=127.0.0.1&quot;</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>
<br>
Don Muller wrote: <o:p></o:p></p>

<p class=MsoNormal>Hi Simon,<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>I would like to request the ability of dnsmasq to lookup dns
names on blacklist servers. If the dns name is blacklisted then return a
specified configurable address, like 127.0.0.1, &nbsp;or a not found error
instead of the true address and add it to a blacklist cache. I see it working
something like this.<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in'>A &nbsp;lookup request is
received.<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in'>Check local (good) cache
and hosts file(s).<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in'>If found<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in'>return
address.<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in'>If not found <o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in'>Look up
address in blacklist cache<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in'>If found<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.5in;text-indent:-1.5in'>Return
specified address or not found<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in'>If not
found<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.5in;text-indent:-1.5in'>Send
request to blacklist servers.<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.5in;text-indent:-1.5in'>If
blacklisted<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:2.0in;text-indent:-.25in'>Return
specified address or not found<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:2.0in;text-indent:-.25in'>Add to
blacklist cache<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.5in;text-indent:-1.5in'>If not
blacklisted<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:2.0in;text-indent:-.25in'>Send to
dns resolvers<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:2.0in;text-indent:-.25in'>Do
normal processing<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>I think this would be great to eliminate a large number of
ad sites, malware sites, and other bad sites.<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>Don<o:p></o:p></p>

<pre><o:p>&nbsp;</o:p></pre><pre style='text-align:center'>

<hr size=4 width="90%" align=center>

</pre><pre><o:p>&nbsp;</o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>Dnsmasq-discuss mailing list<o:p></o:p></pre><pre><a
href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a><o:p></o:p></pre><pre><a
href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><o:p></o:p></pre><pre>&nbsp; <o:p></o:p></pre>

<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Hi Paul,<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>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:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Yes I mean RBLs when I said
blacklist.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Don<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

</div>

</div>

</body>

</html>