<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div></div><div class="gmail_quote">On Wed, Jul 19, 2017 at 6:20 AM, Abi Askushi <span dir="ltr"><<a href="mailto:rightkicktech@gmail.com" target="_blank">rightkicktech@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><br></div>I enabled logging for the queries and am getting now queries from clients in the below form: <br><br>19-Jul-2017 10:11:29.310 client 192.168.200.102#27975: view auth: query: <a href="http://mobile.in.gr" target="_blank">mobile.in.gr</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:29.794 client 192.168.200.102#32874: view auth: query: <a href="http://static.adman.gr" target="_blank">static.adman.gr</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:31.564 client 192.168.200.102#36746: view auth: query: <a href="http://android.clients.google.com" target="_blank">android.clients.google.com</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:32.721 client 192.168.200.102#60248: view auth: query: <a href="http://mobilefeed.in.gr" target="_blank">mobilefeed.in.gr</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:39.440 client 192.168.200.102#53832: view auth: query: <a href="http://stats.g.doubleclick.net" target="_blank">stats.g.doubleclick.net</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:44.523 client 192.168.200.102#22693: view auth: query: <a href="http://mqtt-mini.facebook.com" target="_blank">mqtt-mini.facebook.com</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:51.429 client 192.168.200.102#37734: view auth: query: <a href="http://www.googleapis.com" target="_blank">www.googleapis.com</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:55.603 client 192.168.200.102#62531: view auth: query: <a href="http://clients3.google.com" target="_blank">clients3.google.com</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:57.352 client 192.168.200.102#11788: view auth: query: <a href="http://clients4.google.com" target="_blank">clients4.google.com</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:11:57.353 client 192.168.200.102#19409: view auth: query: <a href="http://clients4.google.com" target="_blank">clients4.google.com</a> IN A + (192.168.200.1)<br>19-Jul-2017 10:12:06.365 client 192.168.200.102#51726: view auth: query: <a href="http://graph.instagram.com" target="_blank">graph.instagram.com</a> IN A + (192.168.200.1)<br><br></div>I could count the queries by parsing the logs though this seems to be somehow inefficient. <br></div>Is there any way that bind9 could be queries otherwise to provide such info?<br><br></div></div></div></blockquote><div><br></div><div>Read up on the statistics channel in the BIND manual.</div><div><br></div><div>-- </div><div>Bob Harold</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div></div>Many thanx, <br></div>Abi<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 19, 2017 at 12:04 AM, Abi Askushi <span dir="ltr"><<a href="mailto:rightkicktech@gmail.com" target="_blank">rightkicktech@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>This could do.</div><div dir="auto">I just have to get those counters.</div><div dir="auto"><br></div><div dir="auto">Thanx,</div><div dir="auto">Abi<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote"><div><div class="m_1581309248276931029h5">On Jul 18, 2017 18:37, "Matthew Seaman" <<a href="mailto:m.seaman@infracaninophile.co.uk" target="_blank">m.seaman@infracaninophile.co.<wbr>uk</a>> wrote:<br type="attribution"></div></div><blockquote class="m_1581309248276931029m_1331856509805719670quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_1581309248276931029h5"><div class="m_1581309248276931029m_1331856509805719670elided-text">On 07/18/17 16:09, Abi Askushi wrote:<br>
> I am trying to figure out how could I account the DNS traffic generated<br>
> from clients in terms of bytes. My setup is a simple caching DNS with<br>
> several clients querying the DNS server.  I can measure the DNS traffic<br>
> that is generated from the DNS server on the WAN side by using some<br>
> monitoring tool (pmacct) but I am not sure how could I account this traffic<br>
> to the clients that are generating this traffic. By simply monitoring the<br>
> internal DNS traffic from clients I expect to not be accurate since it will<br>
> include also cached responses which do not generate WAN traffic.<br>
><br>
> Any suggestion how to approach this problem?<br>
<br>
</div>The implication of what you're suggesting is that if client A looks up<br>
some address that isn't in the cache, then they will be charged for<br>
that. However, if client B then comes along and looks up the exact same<br>
address shortly afterwards, they'll get a response from cache and so not<br>
be charged.  That seems a bit arbitrary.<br>
<br>
Why not charge your clients based simply on the number of queries they<br>
make against your resolver?  You know or can easily find out how many<br>
queries your resolver is handling in total and how much the WAN traffic<br>
that generates is costing you so it should be fairly easy to come up<br>
with a charging scheme based on the average cost per DNS query.<br>
<br>
        Cheers,<br>
<br>
        Matthew<br></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div><div> </div></div><br></div></div>