<?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"
	>

<channel>
	<title>geechorama.com</title>
	<atom:link href="http://www.geechorama.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geechorama.com</link>
	<description></description>
	<pubDate>Mon, 04 Aug 2008 20:08:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Yes, I Am Paranoid</title>
		<link>http://www.geechorama.com/2008/08/01/yes-i-am-paranoid/</link>
		<comments>http://www.geechorama.com/2008/08/01/yes-i-am-paranoid/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 19:41:39 +0000</pubDate>
		<dc:creator>geechorama</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.geechorama.com/?p=20</guid>
		<description><![CDATA[	Up until recently, I had vehemently decided: &#8220;OMG TEH NEIGHBORHOOD HAXXORS!  I must put my wireless access points outside a firewall to protect my internal network!&#8221;

	So I had an IPCop box with a blue zone that had my wireless access points.  They were on a separate subnet and firewalled.

	But after a while, this [...]]]></description>
			<content:encoded><![CDATA[	<p>Up until recently, I had vehemently decided: &#8220;<span class="caps">OMG</span> <span class="caps">TEH</span> <span class="caps">NEIGHBORHOOD</span> HAXXORS!  I must put my wireless access points outside a firewall to protect my internal network!&#8221;</p>

	<p>So I had an <a href="http://www.ipcop.org/">IPCop</a> box with a <a href="http://www.ipcop.org/1.4.0/en/install/html/decide-configuration.html#network-interfaces">blue</a> zone that had my wireless access points.  They were on a separate subnet and firewalled.</p>

	<p>But after a while, this got really old.  Having multiple laptops, I had to <a href="http://en.wikipedia.org/wiki/Secure_copy">scp</a> stuff back and forth to my desktop machines.  Whenever a friend came over, I had to grab their <a href="http://en.wikipedia.org/wiki/MAC_address">MAC</a> address from my IPCop box&#8217;s logs and explicitly give them internet access from the &#8220;blue&#8221; network.  This setup also made tech-support for my <span style="text-decoration: line-through;">Luddite wife</span> Better Half more complicated.</p>

	<p>The real deciding factor though, was all the cool Apple toys that use <a href="http://en.wikipedia.org/wiki/Bonjour_(software)">bonjour</a> and, for the most part, just work together without any hassle or setup.  The Apple TV, iTunes sharing, iPhone remote control application, <a href="http://en.wikipedia.org/wiki/AirPort#AirTunes">AirTunes</a> via the Airport Express, AirTunes via the Apple TV.  All that stuff gets kinda borked if you spread stuff across different subnets.</p>

	<p>So I thought, OK, I&#8217;ll put the wireless access points directly on the internal network, but I wanna be emailed when an unknown <span class="caps">MAC</span> address connects.</p>

	<p>So this what I did:</p>

	<p>First, I told the access points (Airport Extremes in this case) to send syslog messages over the network to my linux box.  That was rather trivial:</p>

	<p style="text-align:center;"> <a href="http://www.geechorama.com/wp-content/uploads/2008/08/2dc9e432cacf773ae6552bcf730bc89e.jpeg"><img class="size-thumbnail wp-image-26" title="easy-peezy" src="http://www.geechorama.com/wp-content/uploads/2008/08/2dc9e432cacf773ae6552bcf730bc89e-320x241.jpg" alt="easy-peezy" width="320" height="241" /></a></p>

	<p>Then, I made sure the syslogd process on my linux box was getting the &#8220;-r&#8221; option (Fedora Core 6, so /etc/sysconfig/syslog) to accept remote syslog messages.</p>

	<p>Then I used the <a href="http://www.johnandcailin.com/blog/john/how-setup-real-time-email-notification-critical-syslog-events">super-handy info here</a> and channeled everything from local0.* into a named pipe and into a script:</p>

<div class="codeblock">
<pre>
local0.*            |/etc/zoppy/pipe
</pre>
</div>

	<p>When a client connects the Airport Extreme spits out a message like this:</p>

<div class="codeblock">
<pre>
Aug  1 14:30:13 zoppy zoppy 80211: Associated with station 00:1d:f4:f8:7c:3d
</pre>
</div>

	<p>So my script ended up looking like this:</p>

<div class="codeblock">
<pre>
#!/bin/sh
TMOUT=1
while read line
do
    echo ${line} | grep &#34;Associated with station&#34; &#62; /dev/null 2&#62;&#38;1
    if test $? -eq 0
    then
        echo ${line} | grep -f /etc/zoppy/known-macs &#62; /dev/null 2&#62;&#38;1
        if test $? -eq 1
        then
            echo ${line} | mail -s &#34;Zoppy: unknown mac address connected&#34; geechorama@spam.email
        fi
    fi
done
</pre>
</div>

	<p>Set it to run every minute:</p>

<div class="codeblock">
<pre>
0-59 * * * * /etc/zoppy/mailer &#60; /etc/zoppy/pipe &#62; /dev/null 2&#62;&#38;1
</pre>
</div>

	<p>If the <span class="caps">MAC</span> address of the machine connected isn&#8217;t in my known-macs file, I get email.</p>

	<p>Paranoid victory!</p>]]></content:encoded>
			<wfw:commentRss>http://www.geechorama.com/2008/08/01/yes-i-am-paranoid/feed/</wfw:commentRss>
		</item>
		<item>
		<title>One Word Book Review™</title>
		<link>http://www.geechorama.com/2008/07/30/one-word-book-review/</link>
		<comments>http://www.geechorama.com/2008/07/30/one-word-book-review/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 13:57:48 +0000</pubDate>
		<dc:creator>geechorama</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.geechorama.com/?p=5</guid>
		<description><![CDATA[	

	Riveting.]]></description>
			<content:encoded><![CDATA[	<p style="text-align:center;"><a href="http://www.amazon.com/Looming-Tower-Qaeda-Road-Vintage/dp/1400030846/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1217425980&amp;sr=8-1"><img class="alignnone size-thumbnail wp-image-6" title="looming" src="http://www.geechorama.com/wp-content/uploads/2008/07/looming.jpg" alt="" width="240" height="240" /></a></p>

	<p>Riveting.</p>]]></content:encoded>
			<wfw:commentRss>http://www.geechorama.com/2008/07/30/one-word-book-review/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Darn It</title>
		<link>http://www.geechorama.com/2008/07/30/darn-it/</link>
		<comments>http://www.geechorama.com/2008/07/30/darn-it/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 13:43:22 +0000</pubDate>
		<dc:creator>geechorama</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.geechorama.com/?p=3</guid>
		<description><![CDATA[	The harddrive in my webserver died.  I&#8217;m in the process of getting everything moved over to dreamhost. Still need to import my old posts and whatnot.  Joy.

	The drive was a 41GB IBM Deskstar manufactured in Hungary in October of 2001.  Add that to your drive failure stats.]]></description>
			<content:encoded><![CDATA[	<p>The harddrive in my webserver died.  I&#8217;m in the process of getting everything moved over to <a href="http://www.dreamhost.com/">dreamhost</a>. Still need to import my old posts and whatnot.  Joy.</p>

	<p>The drive was a 41GB <a href="http://en.wikipedia.org/wiki/IBM_Deskstar"><span class="caps">IBM</span> Deskstar</a> manufactured in <a href="http://en.wikipedia.org/wiki/Hungary">Hungary</a> in <a href="http://en.wikipedia.org/wiki/October_2001">October of 2001</a>.  Add that to <a href="http://labs.google.com/papers/disk_failures.html">your drive failure stats</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.geechorama.com/2008/07/30/darn-it/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
