<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The Pan-Galactic Memory Bank</title>
	<atom:link href="http://n8wood.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://n8wood.wordpress.com</link>
	<description>...so I don't forget stuff</description>
	<lastBuildDate>Sun, 28 Apr 2013 08:47:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='n8wood.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The Pan-Galactic Memory Bank</title>
		<link>http://n8wood.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://n8wood.wordpress.com/osd.xml" title="The Pan-Galactic Memory Bank" />
	<atom:link rel='hub' href='http://n8wood.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Tight Anti-Aliased Fonts in CentOS/RHEL</title>
		<link>http://n8wood.wordpress.com/2009/08/18/tight-anti-aliased-fonts-in-centosrhel/</link>
		<comments>http://n8wood.wordpress.com/2009/08/18/tight-anti-aliased-fonts-in-centosrhel/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 15:54:16 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[anti-alias]]></category>
		<category><![CDATA[anti-aliased]]></category>
		<category><![CDATA[bytecode interpreter]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=192</guid>
		<description><![CDATA[A while back I posted on configuring sharp/non anti-aliased fonts in CentOS, Fedora, and RHEL. Well now I&#8217;ve found some settings that make anti-aliasing look not only bearable, but awesome in Linux. I don&#8217;t know if the font rendering has been improved in the more recent distros or if my tastes just changed. The only [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=192&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A while back I posted on configuring sharp/non anti-aliased fonts in CentOS, Fedora, and RHEL. Well now I&#8217;ve found some settings that make anti-aliasing look not only bearable, but awesome in Linux. I don&#8217;t know if the font rendering has been improved in the more recent distros or if my tastes just changed.</p>
<p>The only annoying piece in this is recompiling Freetype with the bytecode interpreter enabled, but it&#8217;s pretty easy to follow the steps here.</p>
<blockquote><p>wget <a href="http://mirrors.adams.net/centos/5.3/updates/SRPMS/freetype-2.2.1-21.el5_3.src.rpm" rel="nofollow">http://mirrors.adams.net/centos/5.3/updates/SRPMS/freetype-2.2.1-21.el5_3.src.rpm</a></p>
<p>rpm -ivh freetype-2.2.1-21.el5_3.src.rpm</p></blockquote>
<p>Update the paths below to wherever you&#8217;re keeping your source RPM data. For root it&#8217;s usually /usr/src/redhat.</p>
<blockquote><p>vi /usr/src/redhat/SPECS/freetype.spec</p></blockquote>
<p>change the bytecode setting to &#8220;0&#8243;. It&#8217;s usually the first uncommented line:</p>
<blockquote><p>%define without_bytecode_interpreter    0</p></blockquote>
<p>Then build the RPMs:</p>
<blockquote><p>rpmbuild -bb /usr/src/redhat/SPECS/freetype.spec</p></blockquote>
<p>Install them:</p>
<blockquote><p>rpm -ivh /usr/src/redhat/RPMS/freetype*.rpm</p></blockquote>
<p>Then tell yum to ignore Freetype so it doesn&#8217;t remove your custom RPM:</p>
<blockquote><p>vi /etc/yum.conf</p>
<p>exclude = freetype*</p></blockquote>
<p>Restart X to load the new Freetype, and in Gnome go to System &gt; Preferences &gt; Fonts.</p>
<blockquote><p>Set the Fixed width font to &#8220;Monospace 10&#8243;</p>
<p>Set all the other fonts to &#8220;Sans 8&#8243;</p>
<p>Set Font Rendering to &#8220;Subpixel smoothing&#8221;</p></blockquote>
<p>And you&#8217;re good to go. Looks nice, doesn&#8217;t it?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=192&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/08/18/tight-anti-aliased-fonts-in-centosrhel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>Living with SE Linux</title>
		<link>http://n8wood.wordpress.com/2009/07/31/living-with-se-linux/</link>
		<comments>http://n8wood.wordpress.com/2009/07/31/living-with-se-linux/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 15:27:15 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[se linux]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=188</guid>
		<description><![CDATA[SE Linux causes alot of headaches for me because I don&#8217;t truly understand how it works. But instead of disabling it at the first sign of trouble this week, I got some more info on troubleshooting and tweaking the policy. I had compiled my own Bind RPMs to address the latest DoS issue. I&#8217;m running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=188&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>SE Linux causes alot of headaches for me because I don&#8217;t truly understand how it works. But instead of disabling it at the first sign of trouble this week, I got some more info on troubleshooting and tweaking the policy.</p>
<p>I had compiled my own Bind RPMs to address the latest DoS issue. I&#8217;m running version 9.5 since it supports the &#8220;allow-query-cache&#8221; option and RHEL 5 only provides version 9.3. So after I installed my own RPM, of course SE Linux was preventing named from starting. This is how I fixed it:</p>
<p>Check the audit.log for AVC messages:</p>
<pre># cat /var/log/audit/audit.log |grep 'avc:' &gt; /tmp/se.txt</pre>
<p>edit the text file to include only the SE issues you want to address:</p>
<pre># vi /tmp/se.txt</pre>
<p>create a policy module:</p>
<pre># cat /tmp/se.txt | audit2allow -M local</pre>
<p>load the module:</p>
<pre># semodule -i local.pp</pre>
<p>That&#8217;s all it took to get Bind working for me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=188&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/07/31/living-with-se-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>Fail2Ban: Permanent SSH Bans</title>
		<link>http://n8wood.wordpress.com/2009/06/22/fail2ban-permanent-ssh-bans/</link>
		<comments>http://n8wood.wordpress.com/2009/06/22/fail2ban-permanent-ssh-bans/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 17:21:26 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=182</guid>
		<description><![CDATA[Fail2ban is a Python script that scans your security logs for brute force attack signatures and creates iptable rules to ignore traffic from those IPs. It&#8217;s very handy for securing SSH. It has the option to permanently ban IPs, but it gets its list of bad IPs from /var/log/secure. Once those logs are rotated and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=182&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.fail2ban.org">Fail2ban</a> is a Python script that scans your security logs for brute force attack signatures and creates iptable rules to ignore traffic from those IPs. It&#8217;s very handy for securing SSH.</p>
<p>It has the option to permanently ban IPs, but it gets its list of bad IPs from /var/log/secure. Once those logs are rotated and the fail2ban process gets restarted you&#8217;ll no longer be blocking them. So I tweaked it to save all the blocked IPs to a file so you can always blacklist them.</p>
<p>All the changes were in /etc/fail2ban/actions.d/iptables.conf. The first addition loads the list of saved IPs to blacklist (/etc/fail2ban/ip.deny) when the process is first started (the addition is in bold).</p>
<blockquote><p>actionstart = iptables -N fail2ban-&lt;name&gt;<br />
iptables -A fail2ban-&lt;name&gt; -j RETURN<br />
iptables -I INPUT -p &lt;protocol&gt; &#8211;dport &lt;port&gt; -j fail2ban-&lt;name&gt;<br />
<strong>for IP in `cat /etc/fail2ban/ip.deny`; do iptables -I fail2ban-SSH 1 -s $IP -j DROP;done</strong></p></blockquote>
<p>Then under actionban we want to check the list of IP&#8217;s that we explicitly allow (/etc/fail2ban/ip.allow), if it&#8217;s not in that list, ban it and add it to ip.deny:</p>
<blockquote><p>actionban =  if [ -z `awk '$1 == "&lt;ip&gt;" { print "true" }' /etc/fail2ban/ip.allow` ]; then iptables -I fail2ban-&lt;name&gt; 1 -s &lt;ip&gt; -j DROP;fi<br />
if [ -z `awk '$1 == "&lt;ip&gt;" { print "true" }' /etc/fail2ban/ip.deny` ] &amp;&amp; [ -z `awk '$1 == "&lt;ip&gt;" { print "true" }' /etc/fail2ban/ip.allow` ]; then echo &#8220;&lt;ip&gt;&#8221; &gt;&gt; /etc/fail2ban/ip.deny;fi</p></blockquote>
<p>This next change is optional since the unban functionality hasn&#8217;t been added to fail2ban yet:</p>
<blockquote><p>actionunban = if [ -z `awk '$1 == "&lt;ip&gt;" { print "true" }' /etc/fail2ban/ip.deny` ]; then iptables -D fail2ban-&lt;name&gt; -s &lt;ip&gt; -j DROP;fi<br />
if [ -z `awk '$1 == "&lt;ip&gt;" { print "true" }' /etc/fail2ban/ip.deny` ] &amp;&amp; [ -z `awk '$1 == "&lt;ip&gt;" { print "true" }' /etc/fail2ban/ip.allow` ]; then echo &#8220;&lt;ip&gt;&#8221; &gt;&gt; /etc/fail2ban/ip.allow;fi</p></blockquote>
<p>You can always ignore IPs by adding them to the ip.allow file, but I&#8217;d recommend using the jail.conf &#8220;ignoreip&#8221; variable until the unban functionality is finalized (probably in ver 0.9).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=182&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/06/22/fail2ban-permanent-ssh-bans/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>High CPU utilization w/ Centos guest</title>
		<link>http://n8wood.wordpress.com/2009/04/28/high-cpu-utilization-w-centos-guest/</link>
		<comments>http://n8wood.wordpress.com/2009/04/28/high-cpu-utilization-w-centos-guest/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 20:15:45 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[guest]]></category>
		<category><![CDATA[high utilization]]></category>
		<category><![CDATA[recompile]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=177</guid>
		<description><![CDATA[I setup a VirtualBox Centos 5.3 guest for testing since I&#8217;m getting sick of KVM and it&#8217;s limited toolset. One thing I noticed is the guest was using around 100% of a core while idle. After some digging, I was able to find a solution, but it involved recompiling the kernel. In the kernel I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=177&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I setup a VirtualBox Centos 5.3 guest for testing since I&#8217;m getting sick of KVM and it&#8217;s limited toolset. One thing I noticed is the guest was using around 100% of a core while idle. After some digging, I was able to find a solution, but it involved recompiling the kernel. In the kernel I made these changes:</p>
<blockquote><p>Under Processor Type and Features:</p>
<p>Tickless System (Dynamic Ticks) = YES</p>
<p>Paravirtualized guest support = YES</p>
<p>Timer Frequency = 100 HZ</p></blockquote>
<p>It&#8217;s possible I didn&#8217;t need to change all of these, but now idle utilization is down to 2% or less&#8230; a huge difference.</p>
<p>If you&#8217;re not familiar with compiling a kernel on a RHEL system, check out <a href="http://www.howtoforge.com/kernel_compilation_centos">this guide</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=177&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/04/28/high-cpu-utilization-w-centos-guest/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>Anti-aliasing in Jaunty and Firefox</title>
		<link>http://n8wood.wordpress.com/2009/04/27/anti-aliasing-in-jaunty-and-firefox/</link>
		<comments>http://n8wood.wordpress.com/2009/04/27/anti-aliasing-in-jaunty-and-firefox/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 02:01:28 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=166</guid>
		<description><![CDATA[I have been turning off anti-aliasing in Linux since I thought it looked really fuzzy. After upgrading to Jaunty I decided to give it another go, and I&#8217;m glad I did. Fonts look great now&#8230; with the exception of Firefox. For some reason I noticed the Firefox anti-aliasing looked shite. After digging into about:config I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=166&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://n8wood.files.wordpress.com/2009/04/screenshot1.png"><img class="alignright size-medium wp-image-172" title="screenshot1" src="http://n8wood.files.wordpress.com/2009/04/screenshot1.png?w=300&#038;h=187" alt="screenshot1" width="300" height="187" /></a>I have been turning off anti-aliasing in Linux since I thought it looked really fuzzy. After upgrading to Jaunty I decided to give it another go, and I&#8217;m glad I did. Fonts look great now&#8230; with the exception of Firefox. For some reason I noticed the Firefox anti-aliasing looked shite. After digging into about:config I found a setting that fixed it for me.</p>
<blockquote><p>browser.display.auto_quality_min_font_size</p></blockquote>
<p>By default it&#8217;s set to 20, I set it to 1. This improves font rendering quality but may sacrifice some performance. I didn&#8217;t notice any performance hit.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=166&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/04/27/anti-aliasing-in-jaunty-and-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>

		<media:content url="http://n8wood.files.wordpress.com/2009/04/screenshot1.png?w=300" medium="image">
			<media:title type="html">screenshot1</media:title>
		</media:content>
	</item>
		<item>
		<title>iPhone syncing and Linux</title>
		<link>http://n8wood.wordpress.com/2009/04/22/iphone-syncing-and-linux/</link>
		<comments>http://n8wood.wordpress.com/2009/04/22/iphone-syncing-and-linux/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:37:04 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[udev]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=120</guid>
		<description><![CDATA[Note: installing iPhone updates through VirtualBox is not a good idea. Make sure you have a backup method to restore your phone before diving into this. I love my iPhone, but I hate that I can&#8217;t sync it natively inside Linux. I was never able to get iTunes working running under Wine, so I&#8217;ve been [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=120&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>Note: installing iPhone updates through VirtualBox is not a good idea. Make sure you have a backup method to restore your phone before diving into this.</strong></p>
<p>I love my iPhone, but I hate that I can&#8217;t sync it natively inside Linux. I was never able to get iTunes working running under Wine, so I&#8217;ve been forced to create a virtual machine running WinXP to sync it. I don&#8217;t like the idea of a VM running in the background, wasting system resources when it&#8217;s not being used. I wanted a better solution.</p>
<p><a href="http://n8wood.files.wordpress.com/2009/04/vbox.png"><img class="alignleft size-medium wp-image-143" title="VirtualBox" src="http://n8wood.files.wordpress.com/2009/04/vbox.png?w=300&#038;h=261" alt="VirtualBox" width="300" height="261" /></a></p>
<p>With the help of udev and VirtualBox command-line tools, I was able to come up with something better. Now when I&#8217;m ready for bed I plug my iPhone in, VirtualBox automatically boots the VM, and it syncs with iTunes. When I unplug the phone, Windows shuts down automatically. The only time the VM is using system resources is while I&#8217;m sleeping, so I don&#8217;t care.</p>
<p>I think this is as good as it gets with the iPhone on Linux and the only compromise is the time invested to set it up.</p>
<p>To do this, you&#8217;ll first need to install the full version of Sun&#8217;s <a href="http://www.virtualbox.org/wiki/Linux_Downloads">VirtualBox</a>, it includes USB features that are required. It&#8217;s free for personal use. Create a new VM with a bare Windows install on it. I didn&#8217;t install any additional updates and I disabled Windows Update, since it&#8217;s behind a NAT and I won&#8217;t be doing anything other than the sync on it. I also disabled a bunch of unnecessary services and ran <a href="http://en.wikipedia.org/wiki/Bootvis">Bootvis</a> to minimize the VM boot time. Then I mapped a network drive to my music folder (on the host system) so iTunes will have access to my entire music collection. I logged in with my iTunes account and resubscribed to all my podcasts. At this point it&#8217;s not a bad idea to make a copy of the VM in it&#8217;s pristine state.</p>
<h3>VirtualBox Settings</h3>
<p>Shut down Windows. In VirtualBox, right-click the VM and select Preferences. You should tell it to use VT-x/AMD-V <a href="http://n8wood.files.wordpress.com/2009/04/usb.png"><img class="alignright size-medium wp-image-142" title="usb" src="http://n8wood.files.wordpress.com/2009/04/usb.png?w=300&#038;h=275" alt="usb" width="300" height="275" /></a>(General &gt; Advanced) if you have a relatively modern processor that supports virtualization extensions; it&#8217;s not a requirement but will improve performance. The settings you will need are under USB. Check &#8220;Enable USB Controller&#8221; and &#8220;Enable USB 2.0 EHCI Controller&#8221;, the click the plus icon to add a filter. While your iPhone is attached to the system, you should see it listed in the dropdown (Apple Inc. iPhone), select it and click OK. This is required so your VM can see the device. You might also want to configure a sound device (PulseAudio) or iTunes will complain.</p>
<p>Now we get to the fun stuff, tweaking the host Linux system and writing BASH scripts. First, let&#8217;s create a log file that anyone can write to in case we need to troubleshoot:</p>
<blockquote><p>$ sudo touch /var/log/iphone.log</p>
<p>$ sudo chmod 777 /var/log/iphone.log</p></blockquote>
<p>Now, we need to get the internal ID of the VM you created.</p>
<blockquote><p>$ VBoxManage list vms</p></blockquote>
<p>You should see the name of the new VM followed by it&#8217;s UUID in parenthesis. Copy that UUID, we&#8217;ll need it for our first script:</p>
<h3>iphone_attach.sh</h3>
<blockquote><p>#!/bin/bash<br />
export XAUTHORITY=/home/nathan/.Xauthority<br />
export DISPLAY=:0.0<br />
su nathan -c &#8220;/usr/bin/VBoxManage startvm bc341828-db3b-46a9-8bc9-153c8eb35ad7&#8243; &gt;&gt; /var/log/iphone.log</p></blockquote>
<p>The two export lines tell the script which X Windows session to attach to. The final command uses the VBoxManage tools to start your VM, log the output, and do it under your own user account (since this will run as root). Obviously you&#8217;ll need to change &#8220;nathan&#8221; to your account name for each instance. You should also replace the UUID with your own. The remove script is not all too different:</p>
<h3>iphone_remove.sh</h3>
<blockquote><p>#!/bin/bash<br />
export XAUTHORITY=/home/nathan/.Xauthority<br />
export DISPLAY=:0.0<br />
su nathan -c &#8220;/usr/bin/VBoxManage controlvm bc341828-db3b-46a9-8bc9-153c8eb35ad7 acpipowerbutton&#8221; &gt;&gt; /var/log/iphone.log</p></blockquote>
<p>Again, the export commands tell it which X session to use and we use VBoxManage to simulate an ACPI shutdown. You&#8217;ll need to replace the UUID with your own and change the user name and home folder path. Make sure these scripts work before you move on to the udev stuff.</p>
<h3>grab the serial number</h3>
<p>Note, this section was originally created using 0810 (Intrepid) but it broke in Jaunty (0904). I have another way to configure this so it works in Jaunty at the end of this post (it may also work in Interpid).</p>
<p>Now we need to tell Linux to run the above scripts when the device is connected/disconnected from the USB bus. First we need to find the serial number of your iPhone so we can tell udev what to look for.</p>
<blockquote><p>$ lsusb | grep Apple</p></blockquote>
<p>This displays the USB bus and device numbers for your phone, note the two 3-digit numbers and plug them into the next command.</p>
<blockquote><p>udevinfo -a -p `udevinfo -q path -n /dev/bus/usb/004/002`|grep &#8220;ATTR{serial}&#8221;</p></blockquote>
<p>Change 004 to the bus number you got in the previous command and change 002 to your device number. This digs into the attributes of your iPhone and displays the serial number which we&#8217;ll need later on. Note that you can remove the grep command to view all available attributes of your phone if you&#8217;re curious.</p>
<h3>udev stuff</h3>
<p>Go to the udev rules directory and create a new iphone rule, use a lower number like 98 so it gets processed after the other rules.</p>
<blockquote><p>$ cd /etc/udev/rules.d</p>
<p>$ sudo vi 98-iphone.rules</p></blockquote>
<h3>98-iphone.rules</h3>
<blockquote><p>ACTION==&#8221;add&#8221;, SUBSYSTEM==&#8221;usb&#8221;, ATTR{serial}==&#8221;c4560xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&#8221;, SYMLINK+=&#8221;iphone&#8221;, RUN+=&#8221;/home/nathan/scripts/iphone_attach.sh&#8221;</p>
<p>ACTION==&#8221;remove&#8221;, SYMLINK==&#8221;iphone&#8221; ,RUN+=&#8221;/home/nathan/scripts/iphone_remove.sh&#8221;</p></blockquote>
<p>The first line here describes what to look for when a device is attached and what to do when it finds your iPhone. The ACTION, SUBSYTEM, and ATTR declarations tell it to watch for a USB device being added with the serial number of your iPhone. SYMLINK tells it to create an entry on the dev file system for it (/dev/iphone); through trial and error I discovered that this is required so we have something to look for when the phone is disconnected. The RUN section tells it to run the iphone_attach.sh script.</p>
<p>The second line is a bit different and maybe not as intuitive. It is watching for the dev file of your iphone to disappear (/dev/iphone) which happens as soon as you unplug it. Then it runs the iphone_remove.sh script. That&#8217;s it, you&#8217;re done.</p>
<h3>other stuff</h3>
<p>One annoyance I ran into was Nautilus trying to automount the phone as a camera. I was unable to tell it to ignore the iPhone, so I just turned off automount completely in Nautilus using gconf-editor.</p>
<blockquote><p>$ gconf-editor</p>
<p>(uncheck: apps &gt; nautilus &gt; preferences &gt; media_automount)</p></blockquote>
<p>Another idea I had to use the suspend/resume functionality instead of stopping/starting the VM. However, I found that on resume the VM wouldn&#8217;t properly sync with the phone until Windows rebooted, even after using the VBoxManage commands to disconnect/reconnect the phone.</p>
<p><a href="http://n8wood.files.wordpress.com/2009/04/itunes.png"><img class="alignright size-medium wp-image-144" title="itunes" src="http://n8wood.files.wordpress.com/2009/04/itunes.png?w=300&#038;h=247" alt="itunes" width="300" height="247" /></a>In the future, I&#8217;d like to look into reducing the XP install size with something like <a href="http://www.nliteos.com/">nLite</a> and using dropbox to move the VM to the cloud. The ultimate goal would be to have the ability to sync my phone from home, work, or my laptop while travelling. I have some ideas on the way to approach this but it&#8217;s not a burning need at the moment. It would be really cool though.</p>
<p style="text-align:left;"><a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fn8wood.wordpress.com%2F2009%2F04%2F22%2Fiphone-syncing-and-linux%2F&amp;title=iPhone+syncing+and%26nbsp%3BLinux"></a></p>
<h3 style="text-align:left;">Jaunty</h3>
<p style="text-align:left;">Unfortunately I noticed the iphone_remove.sh script was no longer triggering after I upgraded to Jaunty. So I figured out another way to configure udev. First, we need to come up with another identifier to use in the udev rule:</p>
<blockquote>
<p style="text-align:left;">udevadm monitor &#8211;environment</p>
</blockquote>
<p style="text-align:left;">While that command is running in the background, plug in your phone, one of the lines should look like this:</p>
<blockquote>
<p style="text-align:left;">PRODUCT=5ac/1292/1</p>
</blockquote>
<p style="text-align:left;">Copy this line. I&#8217;m not sure if the same ID applies to the original and 3G phones, so run this for yourself. Then we can create the udev rule.</p>
<blockquote>
<p style="text-align:left;">vi /etc/udev/rules.d/98-iphone.rules</p>
</blockquote>
<p style="text-align:left;">You may need to change the Product ID here if it differs from mine, and change the path to your script:</p>
<blockquote>
<p style="text-align:left;">SUBSYSTEM==&#8221;usb&#8221;, ENV{PRODUCT}==&#8221;5ac/1292/1&#8243;, ACTION==&#8221;add&#8221;, RUN+=&#8221;/home/nathan/scripts/iphone_attach.sh&#8221;<br />
SUBSYSTEM==&#8221;usb&#8221;, ENV{PRODUCT}==&#8221;5ac/1292/1&#8243;, ACTION==&#8221;remove&#8221;, RUN+=&#8221;/home/nathan/scripts/iphone_remove.sh&#8221;</p></blockquote>
<p style="text-align:left;">And that&#8217;s it. This may actually be the proper way to configure the rules in Intrepid, but I no longer have a 0810 system to test on.</p>
<p style="text-align:left;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=120&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/04/22/iphone-syncing-and-linux/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>

		<media:content url="http://n8wood.files.wordpress.com/2009/04/vbox.png?w=300" medium="image">
			<media:title type="html">VirtualBox</media:title>
		</media:content>

		<media:content url="http://n8wood.files.wordpress.com/2009/04/usb.png?w=300" medium="image">
			<media:title type="html">usb</media:title>
		</media:content>

		<media:content url="http://n8wood.files.wordpress.com/2009/04/itunes.png?w=300" medium="image">
			<media:title type="html">itunes</media:title>
		</media:content>
	</item>
		<item>
		<title>Automating pass phrase signings with expect</title>
		<link>http://n8wood.wordpress.com/2009/04/06/automating-pass-phrase-signings-with-expect/</link>
		<comments>http://n8wood.wordpress.com/2009/04/06/automating-pass-phrase-signings-with-expect/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 20:34:45 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=116</guid>
		<description><![CDATA[I got annoyed with entering the pass phrase to sign RPMs, especially when I had a script that would build many RPMs while I went off and did something else. So I used expect to script it, and it was quite easy. This is what my rpm build command looked like when run manually: rpmbuild [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=116&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I got annoyed with entering the pass phrase to sign RPMs, especially when I had a script that would build many RPMs while I went off and did something else. So I used expect to script it, and it was quite easy.</p>
<p>This is what my rpm build command looked like when run manually:</p>
<blockquote><p>rpmbuild -bb &#8211;sign &#8211;target=i386,x86_64 package.spec</p></blockquote>
<p>Here&#8217;s the expect script that inputs the pass phrase when prompted:</p>
<blockquote><p>#!/usr/bin/expect<br />
spawn rpmbuild -bb &#8211;sign &#8211;target=i386,x86_64 [lindex $argv 0]<br />
set pass sekretpassword<br />
expect &#8220;phrase:&#8221;<br />
send &#8220;$pass\r&#8221;<br />
interact</p></blockquote>
<p>To run the script once, I would just pass the filename.spec as an argument, but I&#8217;d rather use it to build many RPMs with a single command. Here&#8217;s the bash script I use to do it.</p>
<blockquote><p>#!/bin/bash<br />
cd /home/nathan/rpm/SPECS/<br />
for file in `ls *.spec`<br />
do<br />
/home/nathan/scripts/rpmbuild_expect &#8220;$file&#8221;<br />
done</p></blockquote>
<p>Expect can be used to automate anything that requires standard input, it&#8217;s quite handy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=116&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/04/06/automating-pass-phrase-signings-with-expect/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft, Neutered.</title>
		<link>http://n8wood.wordpress.com/2009/03/31/microsoft-neutered/</link>
		<comments>http://n8wood.wordpress.com/2009/03/31/microsoft-neutered/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 11:44:18 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[ms]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[oss]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=78</guid>
		<description><![CDATA[As we abstract layers of technology, new, transformative technologies become possible. Linux is an enabler of such progress as it emerges from virtualization and cloud computing. Commodity Server Environments Virtualization abstracts the server layer; eliminating driver issues, and making an OS installation look more like an atomic unit instead of a collection of software and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=78&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As we abstract layers of technology, new, transformative technologies become possible. Linux is an enabler of such progress as it emerges from virtualization and cloud computing.</p>
<h3>Commodity Server Environments</h3>
<p>Virtualization abstracts the server layer; eliminating driver issues, and making an OS installation look more like an atomic unit instead of a collection of software and libraries. OS images become the foundation for many different application platforms. Install an OS with some core packages, use it as a template, and you&#8217;ll never have to repeat the process for all the apps you build (until you decide to move to a newer OS). It streamlines and standardizes your server environment. Repositories of free virtual appliances are available now for developers, sys admins, and hobbyists to tweak, learn, and implement.</p>
<p>Need a caching DNS, proxy, mail, web, DB, file, print, or development server? Grab one now, freshly baked, no Windows required.</p>
<h3>Preserved In Carbonite</h3>
<p>Once the hypervisor is pervasive in our environments, we will begin archiving VMs. Want to retire that old HR system since you&#8217;ve moved to a new platform? You can&#8217;t exactly delete the data it contains (in it&#8217;s proprietary format), but odds are you&#8217;ll never actually grab anything from it&#8230; again. Archive the VM. Put it on tape and free up some resources. If the unlikely occurs and you need to access the system, your hypervisor won&#8217;t care if it&#8217;s a decade old OS that only supports decade old hardware. It sure beats a closet full of old servers that may or may not boot; or a folder full of CD&#8217;s that won&#8217;t install on your current hardware/OS (plus you&#8217;ll still need to restore the data from tape).</p>
<p>Remember those VMs you archived, do they require Windows licenses while they&#8217;re sitting on tape, or just when you need to access them a decade from now? Have fun keeping track of that.</p>
<h3>Streamlined Installation and Support</h3>
<p>These atomic units (VMs) also simplify things for software vendors. Instead of shipping an installer, they can ship a VM. This reduces the amount of QA that goes into a product dramatically. It will run perfectly in the environment because it&#8217;s the same system they tested it on. It eliminates software requirements, speeds up problem resolution, and reduces support call volume. Vendors could more easily provide services to customize their products. Configure the image in house and send it out to the client when it&#8217;s ready. No need for messy VPN solutions and vendor access to your inside network.</p>
<p>Why would a vendor choose the additional cost of a Windows license and more importantly, the complexities of redistributing that OS with their virtual appliance?</p>
<h3>The Cloud</h3>
<p>Cloud computing moves the abstraction out even further, to the compute cycles, the storage, and even the data center. The end user doesn&#8217;t care what OS the service runs on, so it will be that of least resistance to the service provider&#8230; probably Linux.</p>
<h3>Vendor Lock-In Versus Ultimate Flexibility</h3>
<p>All of these things work better with an open OS. The ability to create libraries of shared images online is just not possible with Windows. Projects like NC State&#8217;s <a href="http://vcl.ncsu.edu/">Virtual Computing Lab</a> lend themselves to and will thrive in an open, unencumbered environment. Commercial software platforms add unnecessary overhead and crippling restrictions to our enterprises, schools, and governments.</p>
<p>Microsoft may find itself a has been, operating on the thin margins of commoditized desktop OS as organizations see the benefits of open platforms and open formats.</p>
<blockquote><a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fn8wood.wordpress.com%2F2009%2F03%2F31%2Fmicrosoft-neutered%2F&amp;title=Microsoft%2C%26nbsp%3BNeutered."></a></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=78&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/03/31/microsoft-neutered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>Xendomains startup script and SELinux</title>
		<link>http://n8wood.wordpress.com/2009/03/20/xendomains-startup-script-and-selinux/</link>
		<comments>http://n8wood.wordpress.com/2009/03/20/xendomains-startup-script-and-selinux/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 14:47:13 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=73</guid>
		<description><![CDATA[I&#8217;m starting to really hate SE Linux. I was spinning my wheels for a hours recently troubleshooting an error message I would get when running /etc/init.d/xendomains to auto start/stop Xen VMs in CentOS. &#8220;No handlers could be found for logger &#8220;xend&#8221;" If I manually started the VM, it worked fine, but the init script would [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=73&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m starting to really hate SE Linux. I was spinning my wheels for a hours recently troubleshooting an error message I would get when running /etc/init.d/xendomains to auto start/stop Xen VMs in CentOS.</p>
<blockquote><p>&#8220;No handlers could be found for logger &#8220;xend&#8221;"</p></blockquote>
<p>If I manually started the VM, it worked fine, but the init script would just not work. After reducing the script to it&#8217;s most basic functionality and ignoring the settings in /etc/sysconfig/xendomains I was able to determine SE Linux was causing the problem. As soon as I disabled it with &#8220;setenforce 0&#8243;, it worked.</p>
<p>I could understand having this problem if the script or RPM packages were custom, but Xen + xendomains are all Centos packages. The RPMs should contain the SE Linux commands to allow Xen VM startup from the startup script.</p>
<p>Truly annoying.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=73&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/03/20/xendomains-startup-script-and-selinux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
		<item>
		<title>Root Zone Cache &#8211; DDOS Prevention</title>
		<link>http://n8wood.wordpress.com/2009/02/02/allow-query-cache-in-centos/</link>
		<comments>http://n8wood.wordpress.com/2009/02/02/allow-query-cache-in-centos/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 15:31:46 +0000</pubDate>
		<dc:creator>n8wood</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[allow-query-cache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[ddos]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[root zone]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://n8wood.wordpress.com/?p=69</guid>
		<description><![CDATA[I&#8217;m told there is some type of DDOS attack using DNS servers that allow queries of the . (root) zone.  I don&#8217;t know all the details, but Bind will always reply to a query if the result exists in cache, even if you lock down recursion. Odds are the . (root) zone will be available [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=69&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m told there is some type of DDOS attack using DNS servers that allow queries of the . (root) zone.  I don&#8217;t know all the details, but Bind will always reply to a query if the result exists in cache, even if you lock down recursion. Odds are the . (root) zone will be available in cache most (if not all) of the time. The only reasonable way to lock this down (that I know of) is the allow-query-cache setting in Bind. It allows you to only allow cache responses to specific networks and hosts, just like the allow-recursion setting.</p>
<p>After failing to get Bind running with this, I discovered that the setting was not introduced until version 9.4. Unfortunately, Centos/RHEL only provides Bind 9.3. I was unable to find Bind 9.4+ in custom repositories, so I decided to grab the source RPM (9.5.1) from Fedora 10 and build it for Centos 5.</p>
<p>I figured I&#8217;d post a link to them in case they could be of use to anyone else. Note: I have not tested these thoroughly, but they seem to work on my test box.  I&#8217;ve included bind-chroot, if you don&#8217;t use chroot skip that link.</p>
<p>i386:</p>
<p><a href="http://arilon.ccv.brown.edu/rpm/bind-9.5.1-0.8.b2.i386.rpm">http://arilon.ccv.brown.edu/rpm/bind-9.5.1-0.8.b2.i386.rpm</a></p>
<p><a href="http://arilon.ccv.brown.edu/rpm/bind-chroot-9.5.1-0.8.b2.i386.rpm">http://arilon.ccv.brown.edu/rpm/bind-chroot-9.5.1-0.8.b2.i386.rpm</a></p>
<p><a href="http://arilon.ccv.brown.edu/rpm/bind-libs-9.5.1-0.8.b2.i386.rpm">http://arilon.ccv.brown.edu/rpm/bind-libs-9.5.1-0.8.b2.i386.rpm</a></p>
<p><a href="http://arilon.ccv.brown.edu/rpm/bind-utils-9.5.1-0.8.b2.i386.rpm">http://arilon.ccv.brown.edu/rpm/bind-utils-9.5.1-0.8.b2.i386.rpm</a></p>
<blockquote><p>rpm -Uvh bind*</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/n8wood.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/n8wood.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=n8wood.wordpress.com&#038;blog=5574482&#038;post=69&#038;subd=n8wood&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://n8wood.wordpress.com/2009/02/02/allow-query-cache-in-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/8eb845f5ccfa9fe8099dfd963434e12b?s=96&#38;d=http%3A%2F%2F2.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">n8wood</media:title>
		</media:content>
	</item>
	</channel>
</rss>
