<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>errr-online.com &#187; bind9</title>
	<atom:link href="http://www.errr-online.com/index.php/tag/bind9/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.errr-online.com</link>
	<description>Be on the lookout for useless Information</description>
	<lastBuildDate>Sun, 30 May 2010 04:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Troubleshooting Bind9 Queries</title>
		<link>http://www.errr-online.com/index.php/2010/02/05/troubleshooting-bind9-queries/</link>
		<comments>http://www.errr-online.com/index.php/2010/02/05/troubleshooting-bind9-queries/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 16:39:18 +0000</pubDate>
		<dc:creator>errr</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[bind9]]></category>
		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://www.errr-online.com/?p=28</guid>
		<description><![CDATA[Yesterday I was adding a new domain to our servers to slave. While looking though syslog to make sure this was all working I noticed a whole flood of requests for a site that was busted.
unexpected RCODE (REFUSED) resolving &#8216;www.examplesite.com/A/IN&#8217;: x.x.x.x#53
 This was just filling my logs like crazy. I wanted to know who on [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was adding a new domain to our servers to slave. While looking though syslog to make sure this was all working I noticed a whole flood of requests for a site that was busted.<br />
<blockquote>unexpected RCODE (REFUSED) resolving &#8216;www.examplesite.com/A/IN&#8217;: x.x.x.x#53</p></blockquote>
<p> This was just filling my logs like crazy. I wanted to know who on my network was making so many requests for this site.. I was really hoping I didnt have some infected PC on my LAN. To find out I turned on the query log. This is not on by default on Debian, or on Ubuntu, or CentOS which is what I use for all of my DNS. To turn on query log is pretty simple. I added the following to my named.conf.options file</p>
<blockquote><p>logging {<br />
   channel &#8220;querylog&#8221; {<br />
     file &#8220;/var/log/bind9-query.log&#8221;;<br />
     print-time yes;<br />
   };<br />
   category queries {<br />
     querylog;<br />
   };<br />
};</p></blockquote>
<p>Once added you need to make sure this directory is present. If you are in a chroot environment like a good sysadmin remember this path is relevant to your chroot so /var/log/bind9-query.log might really be /chroot/bind9/var/log/bind9-query.log Next make sure your bind user had read/write access to the file.<br />
<blockquote>chown bind:bind /chroot/bind9/var/log/bind9-query.log</p></blockquote>
<p>Next simply<br />
<blockquote>rndc reload</p></blockquote>
<p> and go watch that puppy fill up in a hurry. I do not like to keep this turned on because it fills up so fast and I only seem to need it when there is a problem. If you do decide to keep it turned on make sure you set up a logrotate for it. In my environment this log will get to be several megs in under an hour. Sure hope this will help you figure out who is querying what on your network.</p>
<p>Sample output from the log file</p>
<blockquote><p>
05-Feb-2010 09:08:25.524 client 192.168.1.142#51521: query: claimlj2.my.domain.com IN AAAA +
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.errr-online.com/index.php/2010/02/05/troubleshooting-bind9-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
