<?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>Lackhead.org &#187; Computer-schmuter</title>
	<atom:link href="http://www.lackhead.org/category/computer-schmuter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lackhead.org</link>
	<description>The irascible ramblings of some guy named Chad</description>
	<lastBuildDate>Tue, 06 Jul 2010 04:10:00 +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>Confluence, mod_proxy, and SSL (oh my!)</title>
		<link>http://www.lackhead.org/2009/10/confluence-mod_proxy-and-ssl-oh-my/</link>
		<comments>http://www.lackhead.org/2009/10/confluence-mod_proxy-and-ssl-oh-my/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 03:47:24 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[computer]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/?p=280</guid>
		<description><![CDATA[Whew!  I spent a looooong time today futzing around trying to get Confluence to work with SSL and mod_proxy, and after hours combing the Internet for hope, I did stumble upon a few blog comments here and there, which stitched together provided me with the pretty simple solution I was looking for. Granted, I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Whew!  I spent a <em>looooong</em> time today futzing around trying to get <a href="http://www.atlassian.com/software/confluence/">Confluence</a> to work with SSL and <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html">mod_proxy</a>, and after hours combing the Internet for hope, I did stumble upon a few blog comments here and there, which stitched together provided me with the pretty simple solution I was looking for. Granted, I&#8217;m pretty new to both Confluence and Tomcat, so perhaps that hindered me.  But I also couldn&#8217;t find anything succinct out there that talked about my situation, hence, this posting. </p>
<p>Here&#8217;s my situation- I have an <a href="http://www.apache.org/">Apache</a> server that hosts a number of virtual hosts, including SSL and non-SSL sites. I had recently purchased  <a href="http://www.atlassian.com/software/confluence/">Confluence</a> to provide wiki services for me, my son, and perhaps a few others.  I wanted to tuck Confluence behind Apache, and read up on Confluence&#8217;s web site about how to use  <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html">mod_proxy</a> to get Apache to front-end Confluence.  This turned out to be very simple, and in a matter of minutes I had Confluence up and running.  For those of you who might be interested in doing this, here is a brief overview of the process:</p>
<ol>
<li> Add a virtual host to apache, either named or by IP, with the following configuration:
<pre>
    # This is just passing a proxy to a localhost server
    ProxyRequests Off
    ProxyPreserveHost On

    &lt;Proxy *&gt;
         Order deny,allow
         Allow from all
    &lt;/Proxy&gt;

    ProxyPass / http://localhost:8080/&lt;whatever-space-you-have-confluence-in&gt;
    ProxyPassReverse / http://localhost:8080/&lt;whatever-space-you-have-confluence-in&gt;

    &lt;Location /&gt;
        Order allow,deny
        Allow from all
    &lt;/Location&gt;
</pre>
</li>
<li> Configure Confluence to only listen on to localhost, which is as easy as adding a line to the <code>Connector</code> stanza in the <em>server.xml</em> file that reads <code>address="127.0.0.1"</code>.
</li>
</ol>
<p>Really, that&#8217;s it. This way, Tomcat is not listening on any port that the outside world can see, which means only a service running on that box (apache) can talk to it. </p>
<p>This was all fine and dandy, but I really wanted to get this working over HTTPS so that I could rest a bit easier knowing that my information would be traversing the wild and dangerous Internet encrypted (authentication-related information and everything else). So, the rough idea was that my browser would open up an SSL connection with apache over port 443, and it would proxy to Tomcat via localhost, the later of which didn&#8217;t need to be encrypted because it was confined to my box and wouldn&#8217;t come in contact with the Internet. </p>
<p>Reading up on this turned up a dearth of good information.  Or, at least a nice general summary of what to do. Here&#8217;s what I wound up doing:</p>
<ol>
<li> Change your Apache virtual host to use SSL.  For me, that meant carving out another virtual network interface on my box and assigning it its own IP address. Once that&#8217;s done, you can add <code>Listen</code> directives to get apache to listen on the particular IP:port you are looking for:
<pre>
Listen xxx.xxx.xxx.xxx:443
</pre>
<p>Once that&#8217;s done, you can add the SSL directives to your VirtualHost. This is what my configuration wound up looking like (I removed superfluous entries like logging, etc.):</p>
<pre>
 &lt;VirtualHost xxx.xxx.xxx.xxx:443&gt;
    ServerAdmin &lt;youradminemailaddress&gt;
    ServerName &lt;yourservername&gt;           

    # SSL Setup
    SSLEngine On
    # Allow out medium or high key lengths
    SSLCipherSuite HIGH:MEDIUM
    # Here I am allowing SSLv3 and TLSv1, I am NOT allowing the old SSLv2.
    SSLProtocol all -SSLv2
    # Server Certificate:
    SSLCertificateFile /path/to/public_cert.pem
    # Server Private Key:
    SSLCertificateKeyFile /path/to/private_key.pem
    # Server Certificate Chain:
    SSLCertificateChainFile /path/to/ca_cert.pem
    # Certificate Authority (CA):
    SSLCACertificateFile /path/to/ca_cert.pem

    # This is just passing a proxy to a localhost server
    ProxyRequests Off
    ProxyPreserveHost On

    &lt;Proxy *&gt;
         Order deny,allow
         Allow from all
    &lt;/Proxy&gt;

    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

    &lt;Location /&gt;
        Order allow,deny
        Allow from all
    &lt;/Location&gt;

&lt;/VirtualHost&gt;
</pre>
<p>This really isn&#8217;t any big change from before, just SSL-izing it as you would any host.
</li>
<li> Now, I also had to make a change to the <em>server.xml</em> that added more options to the  <code>Connector</code> stanza. This is what that whole stanza wound up looking like:
<pre>
       &lt;Connector className=&quot;org.apache.coyote.tomcat4.CoyoteConnector&quot; port=&quot;8080&quot; minProcessors=&quot;5&quot;
                   maxProcessors=&quot;75&quot;
                   proxyPort=&quot;443&quot; scheme=&quot;https&quot; proxyName=&quot;wiki.lackhead.org&quot;
                   address=&quot;127.0.0.1&quot;
                   enableLookups=&quot;false&quot; redirectPort=&quot;8443&quot; acceptCount=&quot;10&quot; debug=&quot;0&quot; connectionTimeout=&quot;20000&quot;
                   useURIValidationHack=&quot;false&quot; URIEncoding=&quot;UTF-8&quot;/&gt;
</pre>
<p>The important line is the one with the proxy information.  This tells Tomcat to believe that all incoming requests into your server on port 443, even though hopping through the proxy changes that information. </p>
<p>Given what I traipsed up on the Internet, I had various pieces of this and spent a lot of time trying to figure out what was going on when I would hit the URL, it would connect with the server, but nothing would ever come back. Not really rocket science, but without all the pieces it just wasn&#8217;t working. Now it is. <img src='http://www.lackhead.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2009/10/confluence-mod_proxy-and-ssl-oh-my/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Cisco VPN on MacOSX: Error 51: Unable to communicate with the VPN subsystem</title>
		<link>http://www.lackhead.org/2009/09/cisco-vpn-on-macosx-error-51-unable-to-communicate-with-the-vpn-subsystem/</link>
		<comments>http://www.lackhead.org/2009/09/cisco-vpn-on-macosx-error-51-unable-to-communicate-with-the-vpn-subsystem/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 21:20:23 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[vpn client]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/?p=272</guid>
		<description><![CDATA[This is more of a note for myself, and for the net as the error that I keep running into is not documented all that well online.  Well, at least, when I search for Error 51: Unable to communicate with the VPN subsystem most of the links that I come across say just restart [...]]]></description>
			<content:encoded><![CDATA[<p>This is more of a note for myself, and for the net as the error that I keep running into is not documented all that well online.  Well, at least, when I search for <em>Error 51: Unable to communicate with the VPN subsystem</em> most of the links that I come across say just restart the VPN subsystem and life returns.  This does not fix the problem I get with this error, which comes usually after a OS update. </p>
<p>The fix for me is to completely uninstall the Cisco VPN application, which is actually a command-line activity.  All you have to do is run /usr/local/bin/vpn_uninstall as root (sudo).  This does the full uninstall, and then you can re-install the application and life should return.  If you just update the software in place, the error does not go away. </p>
<p>So there, at least I know I can find out what to do next time I have to jump through this hoop. </p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2009/09/cisco-vpn-on-macosx-error-51-unable-to-communicate-with-the-vpn-subsystem/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hotmail must die, take #2</title>
		<link>http://www.lackhead.org/2009/06/hotmail-must-die-take-2/</link>
		<comments>http://www.lackhead.org/2009/06/hotmail-must-die-take-2/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 08:01:26 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[The Way The World Works]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[hotmail]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spf]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/?p=249</guid>
		<description><![CDATA[Hey blogosphere-
   Just a quick update to an old article on Why Hotmail Must Die- today our mail servers at work got hit with the lovely Hammer &#8216;o Hotmail and all email from our domain to any Microsoft email server (hotmail.com, msn.com, MS Live, etc) is now being rejected.  Not that it [...]]]></description>
			<content:encoded><![CDATA[<p>Hey blogosphere-</p>
<p>   Just a quick update to an old article on <a href="http://www.lackhead.org/2008/04/hotmail-must-die/">Why Hotmail Must Die</a>- today our mail servers at work got hit with the lovely Hammer &#8216;o Hotmail and all email from our domain to any Microsoft email server (hotmail.com, msn.com, MS Live, etc) is now being rejected.  Not that it is exactly the same as the predicament I found myself in last year, but similar enough that I decided to play around and implement <a href="http://www.dkim.org/">DKIM</a> at home to see if that made any difference in deliverability from my domain to Hotmail.  All testing was done with <a href="http://www.openspf.org/">SPF</a> records in place, FYI. Here are the results:</p>
<ol>
<li>No DKIM, no rewriting of headers</ul>
<p> <strong>Result:</strong> email sent from my domain to hotmail.com addresses would just disappear&#8230;or if you were lucky would wind up in the Junk folder.</li>
<li>DKIM, no rewriting of headers</ul>
<p> <strong>Result:</strong> email sent from my domain to hotmail.com addresses would just disappear&#8230;or if you were lucky would wind up in the Junk folder.</li>
<li>DKIM/No DKIM, but postfix configured to nuke any <em>User-Agent:</em> header and to set the <em>X-Mailer:</em> header to read <em>Microsoft Office Outlook 11</em></li>
<p>  <strong>Result:</strong> email sent from my domain to hotmail.com addresses would arrive just fine.</li>
</ol>
<p>So, what&#8217;s the conclusion my fine friends?   Well, industry-standard anti-spam measures like <a href="http://www.openspf.org/">SPF</a> or <a href="http://www.dkim.org/">DKIM</a> seem to have no affect on mail delivery to hotmail.com address. However, telling Microsoft that I&#8217;m using their product seems to do the trick.  Is there any doubt left that Microsoft&#8217;s main business model is bullying? </p>
<p>Somehow, I don&#8217;t think this is going to do the trick at work, but hey, it is at least worth a shot. If anything interesting pops up I&#8217;ll let y&#8217;all know. </p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2009/06/hotmail-must-die-take-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My God&#8230;.it&#8230;is&#8230;ALIVE!!!!!</title>
		<link>http://www.lackhead.org/2009/01/my-goditisalive/</link>
		<comments>http://www.lackhead.org/2009/01/my-goditisalive/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 03:14:24 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/?p=236</guid>
		<description><![CDATA[Wow. Today I put a CD-Rom in my linux box, fired up QEMU running a Windows VM, within that fired up the VMWare Infrastructure Client to connect to a VM farm, started up a virtual machine and connect its virtual CD-Rom back through the VM connection, through QEMU, to my local disk, and using that, [...]]]></description>
			<content:encoded><![CDATA[<p>Wow. Today I put a CD-Rom in my linux box, fired up <a href="http://bellard.org/qemu/index.html">QEMU</a> running a Windows VM, within that fired up the VMWare Infrastructure Client to connect to a VM farm, started up a virtual machine and connect its virtual CD-Rom back through the VM connection, through QEMU, to my local disk, and using <em>that</em>, installed Ubuntu. Surprisingly enough, it went pretty quickly and easily, despite my initial incredulity that it would work at all. </p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2009/01/my-goditisalive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Once more unto the breach, dear friends</title>
		<link>http://www.lackhead.org/2008/11/once-more-unto-the-breach-dear-friends/</link>
		<comments>http://www.lackhead.org/2008/11/once-more-unto-the-breach-dear-friends/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 16:23:00 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[The Way The World Works]]></category>
		<category><![CDATA[diebold]]></category>
		<category><![CDATA[elections]]></category>
		<category><![CDATA[obama]]></category>
		<category><![CDATA[shakespeare]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/?p=216</guid>
		<description><![CDATA[
Once more unto the breach, dear friends, once more,
Or close the wall up with our English dead!
In peace there&#8217;s nothing so becomes a man
As modest stillness and humility;
But when the blast of war blows in our ears,
Then imitate the action of the tiger:
Stiffen the sinews, summon up the blood.
&#8230;show us here
The mettle of your pasture; [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>
Once more unto the breach, dear friends, once more,<br />
Or close the wall up with our English dead!<br />
In peace there&#8217;s nothing so becomes a man<br />
As modest stillness and humility;<br />
But when the blast of war blows in our ears,<br />
Then imitate the action of the tiger:<br />
Stiffen the sinews, summon up the blood.<br />
&#8230;show us here<br />
The mettle of your pasture; let us swear<br />
That you are worth your breeding; which I doubt not.</p>
<div style="text-align: right;"><EM>&#8211; Shakespeare, from Henry V</EM></div>
</blockquote>
<p><P><br />
Well, Mr. Obama, you have my vote. Use it well. May you ride this groundswell and help tip our country, poised so precariously, towards a better future.<br />
<P></p>
<div style="text-align: center;">-c</div>
<p><P><br />
ps- I had an interesting moment this morning while voting. When I was done I asked to speak to the head electiony-dude at my voting place so that I could complain about the Deibold machines being used (yay for Utah).  As soon as I started speaking he rolled his eyes and said, &#8220;You and me both, my friend.&#8221;  We had a short, but heartwarming conversation about our fears, not of a computerized election, but of a <EM>poorly</EM> and <EM>secretly</EM> computerized election.  Please, dear readers, remind me to get involved in local elections, not for running for office, but running elections. This good man I met this morning could use some help in doing the right thing. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2008/11/once-more-unto-the-breach-dear-friends/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hotmail must die</title>
		<link>http://www.lackhead.org/2008/04/hotmail-must-die/</link>
		<comments>http://www.lackhead.org/2008/04/hotmail-must-die/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 01:20:58 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[The Way The World Works]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[things that suck]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/2008/04/hotmail-must-die/</guid>
		<description><![CDATA[Hello blogosphere!
Today&#8217;s adventures in How-The-World-Sucks is brought to you by Microsoft, the evil-doers of the computer world. The latest example of how corporate greed is destroying America came across my plate after a few friends, who use Hotmail for their email provider, mentioned that they were not receiving email from me. Given that this was [...]]]></description>
			<content:encoded><![CDATA[<p>Hello blogosphere!</p>
<p>Today&#8217;s adventures in How-The-World-Sucks is brought to you by Microsoft, the evil-doers of the computer world. The latest example of how corporate greed is destroying America came across my plate after a few friends, who use Hotmail for their email provider, mentioned that they were not receiving email from me. Given that this was multiple people, I figured that there might be something wrong with my email setup. I just so happen to have a Hotmail account (that I never use) and I used that for my testing.  Once I started poking around, here&#8217;s the evidence that I gathered:</p>
<ul>
<li> Email sent from my personal domain would not be delivered to hotmail.com email addresses.  However, I could <em>reply</em> to email messages that originated from hotmail.com, just not send new email to Hotmail.</li>
<li> Email sent from my work (a domain I help administer) to hotmail.com email addresses would go through, but it would take upwards of 3 hours for email to come through, and they would appear in my Junk folder, marked as spam. </li>
<li> Email sent from my Gmail account would go through immediately.</li>
<li> Email sent from several domains run by friends of mine would either never get delivered, or would take ages and ages and then finally appear in my Junk folder.</li>
</ul>
<p>Weird.  According to my mail server logs, and those at work, the email messages destined for hotmail.com addresses were delivered to Hotmail&#8217;s servers without any errors, and according to the SMTP protocol Hotmail is then required to either deliver the email, or bounce it back (neither was happening).  Now, in today&#8217;s spam-filled world this is not always the case, so I was going to give Hotmail the benefit of the doubt for now, and try to figure out what was going wrong. I started poking around on the net, and found zillions of references to people that were having awful problems with mail delivery to Hotmail. Some mentioned issues with Microsoft&#8217;s implementation of <A href="http://www.openspf.org/">SPF</a> SPF, so I removed my entries from DNS, with no change in functionality (yes, I waited for DNS caching to time out). Some mentioned spam filtering issues on Hotmail&#8217;s end, the only solution to which seems to be paying a 3rd-party corporation $1400 and up, per year, to be whitelisted by Hotmail.  Uh, no thanks. </p>
<p>Then, I stumbled across <a href="http://www.iis-aid.com/articles/iis_aid_news/are_hotmail_cutting_their_own_throat">a grammatically awkward but information-rich post</a> by an administrator who ran into similar problems. His post made me try a few things:</p>
<ul>
<li>I sent email from work to my hotmail.com address using Outlook and it went through immediately.</li>
<li>I then configured <a href="http://www.mozilla.com/thunderbird/">Thunderbird</a>, my email reading program, to set the <em>User-Agent</em> header to read &#8220;Microsoft Office Outlook 11&#8243;, and sent email from work to my Hotmail account, and this went through immediately. However, email sent from home with this trick did not work- email would still not be delivered.</li>
<li>I then configured <a href="http://www.postfix.org">Postfix</a>, which I use as my email server, to remove any <em>User-Agent</em> header, as well as inserting <em>X-Mailer: Microsoft Office Outlook 11</em> as a header (which is what Outlook does). This seemed to be the magic fix, as email sent from my personal domain would now go through immediately. </li>
</ul>
<p>Wow.  In my professional opinion, this clearly says that Microsoft is going way out of its way to make people using open source software suffer when dealing with people that use Hotmail.  Just another way in which Microsoft is trying to eliminate competition for its market, not by innovating and producing good products, but by using their market share to fight dirty. Who suffers from this?  We do. The people out there on the streets.  Corporate greed at its finest. </p>
<p>The net result?  Well, I strongly encourage everybody out there that has a Hotmail account to immediately switch to another provider. <a href="http://www.googlemail.com/">Gmail</a> and <a href="http://www.fastmail.fm/">FastMail</a>, among others, would be good choices. In the meantime, I will keep my domain configured to fool Hotmail into thinking I&#8217;m a nice little Microsoft drone, using its crappy products, so that I can send email to my friends.  That is, until they all switch to a better email provider. <img src='http://www.lackhead.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>-c</p>
<p>ps- For those of you out there using Postfix, here are the lines I added to my <a href="http://www.postfix.org/header_checks.5.html">header_checks</a> file to remove the <em>User-Agent</em> header and add in the Outlook header:</p>
<blockquote font-size=1em;><p>
/^User-Agent:/                          IGNORE<br />
/^To:.*hotmail.com/                     PREPEND X-Mailer: Microsoft Office Outlook 11
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2008/04/hotmail-must-die/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Outgoing traffic with IP aliasing</title>
		<link>http://www.lackhead.org/2008/02/outgoing-traffic-with-ip-aliasing/</link>
		<comments>http://www.lackhead.org/2008/02/outgoing-traffic-with-ip-aliasing/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 22:59:42 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[route]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/2008/02/outgoing-traffic-with-ip-aliasing/</guid>
		<description><![CDATA[I recently ran into an issue that, while it had a simple solution, stumped me for a while.  I don&#8217;t know if said stumpitude came from my waning mental faculties or what.  In any case, it took me longer than expected to track down the answer, and since there weren&#8217;t too many pages [...]]]></description>
			<content:encoded><![CDATA[<p>I recently ran into an issue that, while it had a simple solution, stumped me for a while.  I don&#8217;t know if said stumpitude came from my waning mental faculties or what.  In any case, it took me longer than expected to track down the answer, and since there weren&#8217;t too many pages that I found out on the net that addressed this, I thought I&#8217;d at least get this down somewhere. </p>
<p>The issue came up on my main application server, which runs my web server, email server, and is a DNS master for one of my domains. I recently set up a virtual web server under apache, and since it was doing SSL I needed it to run using its own IP address so that I could use an IP-address based virtual server configuration.  Since the machine is running Ubuntu 7.04 (a Debian variant), the ethernet interfaces are set up in <em>/etc/network/interfaces</em>.  Here is what that file looked like before adding the alias:</p>
<blockquote><p><PRE><br />
# The loopback network interface<br />
auto lo<br />
iface lo inet loopback</p>
<p># The primary network interface<br />
auto eth0<br />
iface eth0 inet static<br />
        address 10.0.0.25<br />
        netmask 255.255.255.0<br />
        network 10.0.0.0<br />
        broadcast 10.0.0.255<br />
        gateway 10.0.0.1<br />
</PRE></p></blockquote>
<p>Easy enough to add an alias; I just copied/pasted in another stanza, identical to the eth0 stanza only with the alias set up so that it was set up as eth0:0:</p>
<blockquote><p><PRE><br />
# The secondary network interface<br />
auto eth0:0<br />
iface eth0:0 inet static<br />
        address 10.0.0.50<br />
        netmask 255.255.255.0<br />
        network 10.0.0.0<br />
        broadcast 10.0.0.255<br />
        gateway 10.0.0.1<br />
</PRE></p></blockquote>
<p><span id="more-113"></span></p>
<p>A quick <em>ifup eth0:0</em> and now I was up and running with my one ethernet interface answering to two IP addresses, one which was my original/main IP addr (10.0.0.25) and a new one that I could use for my new virtual web server (10.0.0.50).   </p>
<p>But I ran into a snag- I found out later that my DNS updates were no longer being pushed out to my secondary servers.  Why?  Well, being a good administrator I set up bind on my secondary DNS servers to only accept zone updates from the master server, via a stanza like this in <em>named.conf</em>:</p>
<blockquote><p><PRE><br />
// be secondary for lackhead.org<br />
zone &#8220;foobar.com&#8221; in  {<br />
       type slave;<br />
       notify no;<br />
       file &#8220;db.foobar.com&#8221;;<br />
       masters { 10.0.0.25; };<br />
};<br />
</PRE></p></blockquote>
<p>Looking at the named logs, I saw that the zone updates being pushed out by my master name server were coming from 10.0.0.50, the new IP alias I had just set up. In face, looking at the box, I saw that all outgoing traffic that originated from my server box was coming from this new IP alias I had set up, instead of what I thought of as the primary interface, eth0. </p>
<p>After a bit of digging, I found my error. If you notice up above when I created eth0:0 in the <em>/etc/network/interfaces</em> file, I just copied/pasted the stanza, and then just updated the IP address, and changed the interface name from eth0 to eth0:0.  One effect of this was that the IP alias also had a line that specified the gateway.  The result of this was that when Ubuntu was bringing up the interfaces, it essentially did a <em>ip route add default gw &#8230;.</em> command, which meant that a default route was added to the routing table for each interface. This is what my routing table looked like:</p>
<blockquote><p><PRE><br />
(508) root@myhost:/var/log:# netstat -nr<br />
Kernel IP routing table<br />
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface<br />
10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0<br />
0.0.0.0         10.0.0.1     0.0.0.0         UG        0 0          0 eth0<br />
0.0.0.0         10.0.0.1     0.0.0.0         UG        0 0          0 eth0<br />
(509) root@myhost:/var/log:#<br />
</PRE></p></blockquote>
<p>Note the duplicate entry for <em>0.0.0.0</em>.  This, I think, is where I got confused and/or misled, because netstat doesn&#8217;t seem to report sub interfaces, so while I say that I had two default routes, they both pointed to eth0, not eth0:0, and so in my mind I read this as all traffic should be going out eth0.  Honestly, I consider this a bug, and perhaps I&#8217;ll submit one to Ubuntu for it. </p>
<p>In any case, I did eventually figure out what was going on, and removed the gateway line from the eth0:0 stanza, did a quick <em>ifdown eth0:0 ; ifup eth0:0</em> and viola, not only did the duplicate entry in the routing table not show up, but I got the behavior I had expected; all outgoing traffic from my box now originated from eth0, but any traffic coming into the IP address bound to eth0:0 was responded to out of eth0:0. </p>
<p>Yay!  Lesson to be learned- be wary of perils of cut and paste. </p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2008/02/outgoing-traffic-with-ip-aliasing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Worse is better</title>
		<link>http://www.lackhead.org/2007/06/worse-is-better/</link>
		<comments>http://www.lackhead.org/2007/06/worse-is-better/#comments</comments>
		<pubDate>Sat, 30 Jun 2007 00:25:41 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[The Way The World Works]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/2007/06/worse-is-better/</guid>
		<description><![CDATA[I was recently sent a reference to an essay, written in 1991 by Richard P. Gabriel about the development of the Common Lisp standard. The article is called Lisp: Good News, Bad News, and How to Win Big, and while it is interesting in its own right (to those of us interested in the Lisp [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently sent a reference to an essay, written in 1991 by <a href="http://www.dreamsongs.org/">Richard P. Gabriel</a> about the development of the Common Lisp standard. The article is called <a href="http://www.laputan.org/gabriel/worse-is-better.html">Lisp: Good News, Bad News, and How to Win Big</a>, and while it is interesting in its own right (to those of us interested in the Lisp and Scheme programming languages), what truly stands out about this article is the section called &#8220;Worse Is Better&#8221;.  Although he is talking about Lisp versus C, etc, what he touches upon I believe pervades all of academia, especially engineering.  Engineering, and those with engineering brains, suffer from this dichotomy because they live in a world that splits the difference between theory and implementation. These two paradigms have similar goals but wind up working in opposition more often than not.  Why?  Well, that is the mystery that is probed in this article.<br />
<span id="more-76"></span><br />
I have to say that this is something I have known for a long time, I just never articulated it as well as it is here. And while I do understand why worse is better, and why UNIX and C are viruses, I still remain a steadfast MIT guy, I suppose.  The real rub, I think, is that the MIT approach leads to a slightly different end/perspective as Gabriel gives here.  Mainly, the difference is that the negatives of the MIT approach (long development time, complexity of design/implementation, etc) are all mitigated if you have high standards for your designers and engineers of the project, which is why people at MIT are drawn to it!  It is easy to be idealistic if you can produce like all get out.  But then you run into conflict when you break out of Cambridge and start swimming in waters beyond the Charles; the real world is not made up of people that can hang at MIT, and hence, the real world is governed more by the worse-is-better approach. So, your idealism hits a rock wall of reality, and if it survives, it hardens and becomes more important to you than before, which is a road leading to isolation, bitterness about the world, and being labeled an iconoclast (or likely, other, more profane terms). </p>
<p>So how do you deal with this?  Do you let your idealism whiter a bit?  How do you loosen your grasp without losing it altogether?  How do you stay sharp if you become less demanding, not only on the world around you but on yourself? This has plagued me these last few years, especially at work, and I don&#8217;t have a good answer yet.  I think the trick, if there is one, is kinda like riding a mountain bike down a very loose and rocky trail (something I&#8217;ve been doing a lot lately, so its been on my mind).  The trick there is to not over-grip or use the brakes all that much, let the bike just kinda run under you through all the choss, keeping your body floating above it all, ready at any moment to correct things if they start to get too out of hand.  In other words, relax, let things ride on their own and don&#8217;t get caught up in the mess, but stay vigilant. Don&#8217;t worry so much about the specific path you&#8217;re taking, but that you&#8217;re getting to where you want to go. </p>
<p>God, I could go off on another useless ramble about yoga too&#8230;.is it the sign of the declining mind that whatever you happen to experience in life all seem to click together in some deep meaning?  Or is it just an over-developed sense of metaphor? Perhaps it means that I&#8217;m as crazy as I&#8217;ve always been. </p>
<p>Hmmmm, I am now caught up in a good deal of reflection, and who knows, maybe an old fart like me can grow a little. </p>
<p>Now, on to it. </p>
<p>-c</p>
<blockquote><p>
<H2>Lisp&#8217;s Apparent Failures</H2></p>
<p>Too many teardrops for one heart to be crying.<br />
Too many teardrops for one heart to carry on.<br />
You&#8217;re way on top now, since you left me,<br />
Always laughing, way down at me.</p>
<p><UL>&#8212; <EM>? &#038; The Mysterians</EM></UL></p>
<p>This happy story, though, has a sad interlude, an interlude that might be attributed to the failure of artificial intelligence (AI) to soar, but which probably has some other grains of truth that we must heed. The key problem with Lisp today stems from the tension between two opposing software philosophies. The two philosophies are called The Right Thing and Worse is Better.</p>
<p><H3>The Rise of Worse is Better</H3></p>
<p>I and just about every designer of Common Lisp and the Common Lisp Object Standard (CLOS) has had extreme exposure to the MIT/Stanford style of design. The essence of this style can be captured by the phrase the right thing. To such a designer it is important to get all of the following characteristics right:</p>
<p><DL><br />
    <DT>Simplicity</DT><br />
    <DD>the design must be simple, both in implementation and interface. It is more important for the interface to be simple than the implementation.</DD><br />
    <DT>Correctness</DT><br />
    <DD>the design must be correct in all observable aspects. Incorrectness is simply not allowed.</DD><br />
    <DT>Consistency</DT><br />
    <DD>the design must not be inconsistent. A design is allowed to be slightly less simple and less complete to avoid inconsistency. Consistency is as important as correctness.</DD><br />
    <DT>Completeness</DT><br />
    <DD>the design must cover as many important situations as is practical. All reasonably expected cases must be covered. Simplicity is not allowed to overly reduce completeness.</DD><br />
</DL> </p>
<p>I believe most people would agree that these are good characteristics. I will call the use of this philosophy of design the MIT approach Common Lisp (with CLOS) and Scheme represent the MIT approach to design and implementation.</p>
<p>The worse-is-better philosophy is only slightly different:</p>
<p><DL><br />
    <DT>Simplicity</DT><br />
    <DD>the design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design.</DD><br />
    <DT>Correctness</DT><br />
    <DD>the design must be correct in all observable aspects. It is slightly better to be simple than correct.</DD><br />
    <DT>Consistency</DT><br />
    <DD>the design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either implementational complexity or inconsistency.</DD><br />
    <DT>Completeness</DT><br />
    <DD>the design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favor of any other quality. In fact, completeness must sacrificed whenever implementation simplicity is jeopardized. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface. </DD><br />
</DL></p>
<p>Early Unix and C are examples of the use of this school of design, and I will call the use of this design strategy the New Jersey approach I have intentionally caricatured the worse-is-better philosophy to convince you that it is obviously a bad philosophy and that the New Jersey approach is a bad approach.</p>
<p>However, I believe that worse-is-better, even in its strawman form, has better survival characteristics than the-right-thing, and that the New Jersey approach when used for software is a better approach than the MIT approach.</p>
<p>Let me start out by retelling a story that shows that the MIT/New-Jersey distinction is valid and that proponents of each philosophy actually believe their philosophy is better.</p>
<p>Two famous people, one from MIT and another from Berkeley (but working on Unix) once met to discuss operating system issues. The person from MIT was knowledgeable about ITS (the MIT AI Lab operating system) and had been reading the Unix sources. He was interested in how Unix solved the PC loser-ing problem. The PC loser-ing problem occurs when a user program invokes a system routine to perform a lengthy operation that might have significant state, such as IO buffers. If an interrupt occurs during the operation, the state of the user program must be saved. Because the invocation of the system routine is usually a single instruction, the PC of the user program does not adequately capture the state of the process. The system routine must either back out or press forward. The right thing is to back out and restore the user program PC to the instruction that invoked the system routine so that resumption of the user program after the interrupt, for example, re-enters the system routine. It is called PC loser-ing because the PC is being coerced into loser mode, where loser is the affectionate name for user at MIT.</p>
<p>The MIT guy did not see any code that handled this case and asked the New Jersey guy how the problem was handled. The New Jersey guy said that the Unix folks were aware of the problem, but the solution was for the system routine to always finish, but sometimes an error code would be returned that signaled that the system routine had failed to complete its action. A correct user program, then, had to check the error code to determine whether to simply try the system routine again. The MIT guy did not like this solution because it was not the right thing.</p>
<p>The New Jersey guy said that the Unix solution was right because the design philosophy of Unix was simplicity and that the right thing was too complex. Besides, programmers could easily insert this extra test and loop. The MIT guy pointed out that the implementation was simple but the interface to the functionality was complex. The New Jersey guy said that the right tradeoff has been selected in Unix &#8212; namely, implementation simplicity was more important than interface simplicity.</p>
<p>The MIT guy then muttered that sometimes it takes a tough man to make a tender chicken, but the New Jersey guy didn&#8217;t understand (I&#8217;m not sure I do either).</p>
<p>Now I want to argue that worse-is-better is better. C is a programming language designed for writing Unix, and it was designed using the New Jersey approach. C is therefore a language for which it is easy to write a decent compiler, and it requires the programmer to write text that is easy for the compiler to interpret. Some have called C a fancy assembly language. Both early Unix and C compilers had simple structures, are easy to port, require few machine resources to run, and provide about 50%-80% of what you want from an operating system and programming language.</p>
<p>Half the computers that exist at any point are worse than median (smaller or slower). Unix and C work fine on them. The worse-is-better philosophy means that implementation simplicity has highest priority, which means Unix and C are easy to port on such machines. Therefore, one expects that if the 50% functionality Unix and C support is satisfactory, they will start to appear everywhere. And they have, haven&#8217;t they?</p>
<p>Unix and C are the ultimate computer viruses.</p>
<p>A further benefit of the worse-is-better philosophy is that the programmer is conditioned to sacrifice some safety, convenience, and hassle to get good performance and modest resource use. Programs written using the New Jersey approach will work well both in small machines and large ones, and the code will be portable because it is written on top of a virus.</p>
<p>It is important to remember that the initial virus has to be basically good. If so, the viral spread is assured as long as it is portable. Once the virus has spread, there will be pressure to improve it, possibly by increasing its functionality closer to 90%, but users have already been conditioned to accept worse than the right thing. Therefore, the worse-is-better software first will gain acceptance, second will condition its users to expect less, and third will be improved to a point that is almost the right thing. In concrete terms, even though Lisp compilers in 1987 were about as good as C compilers, there are many more compiler experts who want to make C compilers better than want to make Lisp compilers better.</p>
<p>The good news is that in 1995 we will have a good operating system and programming language; the bad news is that they will be Unix and C++.</p>
<p>There is a final benefit to worse-is-better. Because a New Jersey language and system are not really powerful enough to build complex monolithic software, large systems must be designed to reuse components. Therefore, a tradition of integration springs up.</p>
<p>How does the right thing stack up? There are two basic scenarios: the big complex system scenario and the diamond-like jewel scenario.</p>
<p>The big complex system scenario goes like this:</p>
<p>First, the right thing needs to be designed. Then its implementation needs to be designed. Finally it is implemented. Because it is the right thing, it has nearly 100% of desired functionality, and implementation simplicity was never a concern so it takes a long time to implement. It is large and complex. It requires complex tools to use properly. The last 20% takes 80% of the effort, and so the right thing takes a long time to get out, and it only runs satisfactorily on the most sophisticated hardware.</p>
<p>The diamond-like jewel scenario goes like this:</p>
<p>The right thing takes forever to design, but it is quite small at every point along the way. To implement it to run fast is either impossible or beyond the capabilities of most implementors.</p>
<p>The two scenarios correspond to Common Lisp and Scheme.</p>
<p>The first scenario is also the scenario for classic artificial intelligence software.</p>
<p>The right thing is frequently a monolithic piece of software, but for no reason other than that the right thing is often designed monolithically. That is, this characteristic is a happenstance.</p>
<p>The lesson to be learned from this is that it is often undesirable to go for the right thing first. It is better to get half of the right thing available so that it spreads like a virus. Once people are hooked on it, take the time to improve it to 90% of the right thing.</p>
<p>A wrong lesson is to take the parable literally and to conclude that C is the right vehicle for AI software. The 50% solution has to be basically right, and in this case it isn&#8217;t.</p>
<p>But, one can conclude only that the Lisp community needs to seriously rethink its position on Lisp design.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2007/06/worse-is-better/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Old climbing, self massage and number representation pages back online</title>
		<link>http://www.lackhead.org/2007/05/old-climbing-self-massage-and-number-representation-pages-back-online/</link>
		<comments>http://www.lackhead.org/2007/05/old-climbing-self-massage-and-number-representation-pages-back-online/#comments</comments>
		<pubDate>Wed, 23 May 2007 20:23:35 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Climbaholic]]></category>
		<category><![CDATA[Computer-schmuter]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/2007/05/old-climbing-self-massage-and-number-representation-pages-back-online/</guid>
		<description><![CDATA[Hello there crimestoppers!
Chad here. Just wanted to let everybody know that I&#8217;ve copied over some of my old web pages to my new site so that these bad boys are back online.  I use the climbing pages myself, as these are fantastic articles that are always good for a re-acquaintance.  And the numbers [...]]]></description>
			<content:encoded><![CDATA[<p>Hello there crimestoppers!</p>
<p>Chad here. Just wanted to let everybody know that I&#8217;ve copied over some of my old web pages to my new site so that these bad boys are back online.  I use the climbing pages myself, as these are fantastic articles that are always good for a re-acquaintance.  And the numbers page I <em>still</em> get email about, even though I wrote them some 947 years ago when I was teaching at <a href="http://www.cs.indiana.edu">Computer Science Department</a> at <a href="http://www.indiana.edu">Indiana University</a>. Anyway, here they are in all their glory. Enjoy!</p>
<ul>
<li> <a href="/jamming">Jamming</a>: the inside scoop on hands to fingers jamming from Steph Davis.</li>
<li> <a href="/self_massage">Self Massage</a>: a routine for self-massage of the forearms, that helps prevent tendonitis and other over-use injuries </li>
<li> <a href="/number_representations">Number Representations</a>: a tutorial I wrote on working with numbers in other bases, i.e. binary, hexadecimal, etc.
</ul>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2007/05/old-climbing-self-massage-and-number-representation-pages-back-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create your own South Park character</title>
		<link>http://www.lackhead.org/2007/05/create-your-own-south-park-character/</link>
		<comments>http://www.lackhead.org/2007/05/create-your-own-south-park-character/#comments</comments>
		<pubDate>Wed, 16 May 2007 22:55:00 +0000</pubDate>
		<dc:creator>lackhead</dc:creator>
				<category><![CDATA[Computer-schmuter]]></category>
		<category><![CDATA[Wonderfulness]]></category>

		<guid isPermaLink="false">http://www.lackhead.org/2007/05/create-your-own-south-park-character/</guid>
		<description><![CDATA[ This is the South Park character that I just created using South Park Studio, and online flash tool that, well, allows you to create your own South Park dudes.  I call him &#8220;Monsieur Malheureaux&#8221; and he&#8217;s hiding out in Osama Bin-Laden&#8217;s cave. Kids love him! 
I came across this via a movie on [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/south-park.jpg" alt="My South Park character" class=left /> This is the South Park character that I just created using <a href="http://www.sp-studio.de">South Park Studio</a>, and online flash tool that, well, allows you to create your own South Park dudes.  I call him &#8220;Monsieur Malheureaux&#8221; and he&#8217;s hiding out in Osama Bin-Laden&#8217;s cave. Kids love him! </p>
<p>I came across this via a movie on YouTube that used this to create a neat spoof of the venerable Mac vs. PC ads (the &#8220;where&#8217;st he beef?&#8221; of today&#8217;s generation, I guess). Check it out for yourself:</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/Id_kGL3M5Cg"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Id_kGL3M5Cg" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lackhead.org/2007/05/create-your-own-south-park-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
