<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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:Menlo;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
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;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.hljs-title
{mso-style-name:hljs-title;}
span.hljs-params
{mso-style-name:hljs-params;}
span.hljs-string
{mso-style-name:hljs-string;}
span.hljs-number
{mso-style-name:hljs-number;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></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 lang="ES" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Did you use dnsdist?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Can be easy to do using regular expressions<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span class="hljs-title"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#990000;background:whitesmoke">addAction</span></b></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">(RegexRule(</span></span><span class="hljs-string"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#DD1144;background:whitesmoke">"[0-9]{5,}"</span></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">)</span></span><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">,
</span><span class="hljs-title"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#990000;background:whitesmoke">DelayAction</span></b></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">(</span></span><span class="hljs-number"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:teal;background:whitesmoke">750</span></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">)</span></span><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">)
-- milliseconds <o:p></o:p></span></p>
<p class="MsoNormal"><span class="hljs-title"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#990000;background:whitesmoke">addAction</span></b></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">(RegexRule(</span></span><span class="hljs-string"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#DD1144;background:whitesmoke">"[0-9]{4,}\\.cn$"</span></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">)</span></span><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">,
</span><span class="hljs-title"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#990000;background:whitesmoke">DropAction</span></b></span><span class="hljs-params"><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">()</span></span><span lang="EN-US" style="font-size:10.0pt;font-family:Menlo;color:#333333;background:whitesmoke">)</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> dnsdist [mailto:dnsdist-bounces@mailman.powerdns.com]
<b>On Behalf Of </b>Federico Olivieri<br>
<b>Sent:</b> miércoles, 8 de junio de 2016 16:54<br>
<b>To:</b> Aleš Rygl <ales@rygl.net><br>
<b>Cc:</b> dnsdist@mailman.powerdns.com<br>
<b>Subject:</b> Re: [dnsdist] Block Random queries<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi guys for both responses. I was thinking more something to u32 module on iptables. Let me be clear: the only fix values are the length of the random charters that is "8" and the mix letters/numbers. What I was trying to do is something
like:<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">If the first 8 characters are random<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and there are more then 2 numbers<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">then block<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">else allow<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Anyone can suggest me something for that?<br>
<br>
Regards<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Federico<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">2016-06-08 14:55 GMT+01:00 Aleš Rygl <<a href="mailto:ales@rygl.net" target="_blank">ales@rygl.net</a>>:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p>Hi Frederico.<o:p></o:p></p>
<p>It is imho almost impossible to block such queries. They are usually running at low rates per client per second but from many clients... I have already opened a feature request for a dynamic rule that would allow to insert rules based on dnsdist statistics
of responses: <a href="https://github.com/PowerDNS/pdns/issues/3888" target="_blank">
https://github.com/PowerDNS/pdns/issues/3888</a><o:p></o:p></p>
<p>In the mean time it could be done by an external script grabing topResponses from dnsdist, analyzing them ans install a rule.<o:p></o:p></p>
<p>Regards<o:p></o:p></p>
<p>Ales<o:p></o:p></p>
<div>
<div>
<p> <o:p></o:p></p>
<p>On Wed, 8 Jun 2016 13:53:37 +0100, Federico Olivieri wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #1010FF 1.5pt;padding:0cm 0cm 0cm 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi everybody, <o:p></o:p></p>
<div>
<p class="MsoNormal">My server receives some random queries as <a href="http://xfz3421xc.domain.com" target="_blank">
xfz3421xc.domain.com</a>, <a href="http://jh65jj3e.domain2.com" target="_blank">jh65jj3e.domain2.com</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Can someone suggests some LUA script to block these kind of random queries?<br>
<br>
Thanks<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Federico<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
dnsdist mailing list<br>
<a href="mailto:dnsdist@mailman.powerdns.com">dnsdist@mailman.powerdns.com</a><br>
<a href="https://mailman.powerdns.com/mailman/listinfo/dnsdist" target="_blank">https://mailman.powerdns.com/mailman/listinfo/dnsdist</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>