<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
    <channel>
        <title>Information Systems Grad School</title>
        <link>http://cw.sampas.net/blog/</link>
        <description>Information Systems grad school from the perspective of an MCSE-CISSP geek.</description>
        <language>en</language>
        <copyright>Copyright 2011</copyright>
        <lastBuildDate>Tue, 29 Nov 2011 21:02:08 -0500</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>Snom, pfSense, OpenVPN, and Asterisk: Cheaper than Cisco</title>
            <description><![CDATA[<p>VOIP and SIP have made calling cheaper than ever, but security is only just catching up. The idea of a secure, transportable (hard) phone has been around for a while. Just look at the <a href="http://en.wikipedia.org/wiki/STU-III">STU-III</a> or the <a href="http://en.wikipedia.org/wiki/KY-3">KY-3</a>. Cisco is moving away from the phone proxy on its ASA devices and towards an IPSec client in the phone with its associated licensing. <a href="http://www.snom.com/">Snom</a>, <a href="http://www.openvpn.net/">OpenVPN</a>, and <a href="http://www.asterisk.org/home">Asterisk </a>can do the same for less. The Snom 370, 800-series, and 7x0 series phones have the OpenVPN client in the firmware.</p>

<p>Asterisk's built-in encryption is only just starting to work in 1.8, and it would require you to open ports to your Asterisk server from the Internet. Enter OpenVPN, an open-source user-space VPN that's lighter weight than IPSec. Better yet, no per-client licensing fees like Cisco. (Unless you want commercially supported OpenVPN @ $10/client.) Asterisk itself isn't quite ready for the enterprise, but we're all hoping Asterisk 10 is ready for prime time.</p>

<p>Using the built-in OpenVPN server in pfSense 2.0, you can connect your Snom phone across the internet to your internal network, and Asterisk securely. (Although it does not do end-to-end encryption, even if you run OpenVPN on your Asterisk server.)</p>

<p><big>Part 1: pfSense OpenVPN config</big></p>

<p><br />
In the pfSense OpenVPN server page, choose the following parameters: (DISCLAIMER: this is certainly not the only way to do this, nor the most secure.) I'm also going to assume you've already used the pfSense Cert Manager to create a CA and issue a client certificate for the your Snom phone.</p>

<p>OpenVPN | Server</p>

<p>General<br />
Disabled: Not checked.<br />
Server Mode: Remote Access (SSL/TLS).<br />
Protocol: UDP<br />
Device Mode: tun<br />
Interface: WAN<br />
Local Port: 1194 (default)<br />
Description: SnomPhoneVPN</p>

<p>Crypto Settings:<br />
TLS Authentication: Checked (pfSense should populate the box with an OpenVPN Static Key.) <br />
Peer Certificate Authority: InternalCA (What you set up in pfSense's CA Page.)<br />
Peer Certificate Revocation List: (leave default for now.)<br />
Server Certificate: OpenVPNServer (CA: InternalCA)<br />
DH Params Length: 1024<br />
Encryption Algorithm: AES-256-CBC (256-bit)<br />
Hardware Crypto: No Hardware Crypto (Unless you've got a card...)</p>

<p>Tunnel Settings:<br />
Tunnel Network: Choose a <a href="http://en.wikipedia.org/wiki/Private_network">private IP space</a> that's not 192.168.x.x, so it doesn't conflict with every NAT home network. (10.1.0.0/24) should work most places.<br />
Redirect gateway: Checked if you want it to be more secure, but you'll lose local access to the phone.<br />
Local Network: Enter yor local LAN IP space here, e.g. the one you Asterisk server is on.<br />
Concurrent connections: 1 or more.<br />
Compression: unchecked.<br />
Inter-client Communications: not checked.<br />
Duplicate connections: leave this checked for testing only.</p>

<p>Client Settings: The only one that needs to be checked is "Provide a virtual adapater IP addresss to clients."</p>

<p>Advanced: Nothing is required here.</p>

<p><big>Part 2: Client OpenVPN config</big></p>

<p>Use the OpenVPN client export utility (0.9.6). Export the Configuration Archive. Unzip the files. Rename the x.ovpn file to vpn.cnf and edit it to add /openvpn/ in front of the cert and key file names. Then place it in a dir/folder called openvpn and tar it from within the folder, per <a href="http://wiki.snom.com/Networking/Virtual_Private_Network_(VPN)#Example_of_a_VPN_snom_tarball">SNOM</a>. </p>

<p>Keep in mind that the two other files in there, the personal certificate (x-.p12) and the OpenVPN TLS key (x-tls.key) are the keys to your network, so protect them. When we selected Remote Access (SSL/TLS) in step one, that means certificate only, and then added the TLS key. So no username and password required. (You can try adding them, but you'll need to hard-code them in another file in the config tarball, so it won't make much difference.)</p>

<p>vpn.cnf after <strong>editing</strong>:<br />
<pre><br />
dev tun<br />
persist-tun<br />
persist-key<br />
proto udp<br />
cipher AES-256-CBC<br />
tls-client<br />
client<br />
resolv-retry infinite<br />
remote x.x.x.x 1194<br />
tls-remote OpenVPNServer<br />
pkcs12 <strong>/openvpn/</strong>pfsense-udp-1194.p12<br />
tls-auth <strong>/openvpn/</strong>pfsense-udp-1194-tls.key 1<br />
</pre></p>

<p>where x.x.x.x is your WAN IP Address, or preferably, your dynamically updated DNS name if your IP is subject to change.</p>

<p>Once you have the tarball, follow SNOM's instructions to get it onto the phone. (Hint: you'll need to place it on a webserver, but preferably not one that's publicly available or unauthenticated.)</p>

<p><br />
<big>Gotchas:</big></p>

<ol>
	<li>The phone's NTP server needs to be available on whatever network you plug in to.</li>
	<li>You need to follow Snom's instructions on how to create the tar file, which may be different than what you're used to.</li>
	<li>You need netcat running to see OpenVPN logs. They don't go to the phone's syslog server.</li>
	<li>If you blow up your Snom phone (can't connect to it any more), be sure to have the firmware image available on a local tftp server so you can start all over.</li>
	<li>Don't forget to add your OpenVPN network to Asterisk's sip_nat.conf or you'll drop calls.</li>
	<li>Be aware that the Snom phones can also route packets from devices behind it via the PC port. You'll need to consider how to secure your internal network from the vpn phones.</li>
       <li>If your Snom phone doesn't grab the tarball after boot, you'll need to put a dummy file on the webserver that's referenced on the advanced | update | Setting URL: parameter called "snom370.htm". Then the phone should start grabbing the tarball again. This may be a bug in snom370-SIP 8.4.32, the version tested.</li>
</ol>
]]></description>
            <link>http://cw.sampas.net/blog/2011/11/snom-pfsense-openvpn-and-aster.html</link>
            <guid>http://cw.sampas.net/blog/2011/11/snom-pfsense-openvpn-and-aster.html</guid>
            
            
            <pubDate>Tue, 29 Nov 2011 21:02:08 -0500</pubDate>
        </item>
        
        <item>
            <title>VBScript: MD5 sum and file details into CSV</title>
            <description><![CDATA[<p>Some things are trivial in Linux/Unix and more complex in Windows. In Linux, it's md5sum filename. In Windows, there are free tools from Microsoft (fciv.exe), but no built-in commands that are super-easy to script.</p>

<p>So what are you to do if you need to collect file details and hashes for every folder within the subfolders of a directory? If you're doing it with VBScript, you'll need a free library available from <a href="http://www.xstandard.com/en/documentation/xmd5/#api1">XStandard</a>. Once you register, you'll get a dll that you'll need to register. (It's 32-bit only, so if you're on a 64-bit box, you'll need to do this:<br />
C:\WINDOWS\SysWOW64\regsvr32.exe XMD5.dll<br />
and then to execute the script:<br />
c:\windows\SysWOW64\cscript.exe FolderReportMD5.vbs )</p>

<p>Anyhow, this script is derived from the Sapien sample scripts. (While there are many free editors out there, I think <a href="http://www.sapien.com/software/primalscript">Sapien's PrimalScript</a> is worth every penny if you'll be doing a lot of Windows scripting.)</p>

<p>And since my MT template doesn't handle code well, here's a <a href="http://cw.sampas.net/filelist.txt">link</a> to the text file.<br />
<pre><br />
'**************************************************************************<br />
'	File:  FileListMD5.vbs<br />
'<br />
'	Comments: This script uses the MD5 library available here: <br />
'   http://www.xstandard.com/en/documentation/xmd5/#api1<br />
'   This script runs through a directory tree and writes file attributes to a csv file.<br />
'   To run on x64 use C:\WINDOWS\SysWOW64\regsvr32.exe XMD5.dll and then execute via <br />
'   c:\windows\SysWOW64\cscript.exe FolderReportMD5.vbs<br />
'   Based on Sapien's sample script for FolderProperties.<br />
'**************************************************************************<br />
 Set objFSO2 = createobject("scripting.filesystemobject")<br />
 'where to put the file list?<br />
Set objFile = objFSO2.createtextfile("c:\scripts\" & "FileList" & ".csv")<br />
q = """"<br />
'write the header line of the CSV file.<br />
objFile.WriteLine(q & "FilePath" & q & "," & q & "FileName" & q & "," & q & "DateCreated" & q _<br />
 & "," & q & "DateLastAccessed" & q & "," & q & "DateLastModified" & q & "," & q & "FileSize" & q &_<br />
  "," & q & "MD5Hash" & q & "," & q & "FileAttributes" & q)</p>

<p>'where to start<br />
strSource="C:\folder"</p>

<p>Set objFSO=CreateObject("Scripting.FileSystemObject")<br />
Set objFolder=objFSO.GetFolder(strSource)</p>

<p>Call ProcessFiles(objFolder)</p>

<p>Sub ProcessFiles(objFolder)<br />
Set colFiles=objFolder.Files</p>

<p><br />
For Each file In colFiles<br />
   'it's a good idea to clear out the vars on each loop<br />
   strFingerPrint = "blank"<br />
   strPath = File.Path<br />
   Set objMD5 = CreateObject("XStandard.MD5")<br />
   strFingerPrint = objMD5.GetCheckSumFromFile(strPath)<br />
   Set objMD5 = Nothing<br />
   wscript.Echo strFingerPrint<br />
   wscript.Echo "File Name:" & vbTab & File.Name<br />
wscript.Echo "Short File Name:" & vbtab & File.ShortName<br />
wscript.Echo "File Path:" & vbtab & File.Path<br />
wscript.Echo "Date Created:" & vbtab & File.DateCreated<br />
wscript.Echo "Date Last Accessed:" & vbtab & File.DateLastAccessed<br />
wscript.Echo "Date Last Modified:" & vbtab & File.DateLastModified<br />
wscript.Echo "File Size:" & vbtab & File.Size<br />
wscript.Echo "File Attributes:"<br />
strFileAttributes = " "<br />
if File.Attributes AND 0 Then wscript.Echo " Normal"<br />
If File.Attributes And 0 Then strFileAttributes = strFileAttributes & " Normal"<br />
if File.Attributes AND 1 then wscript.Echo " Read-only"<br />
If File.Attributes And 1 Then strFileAttributes = strFileAttributes & " Read-only"<br />
if File.Attributes AND 2 then wscript.Echo " Hidden"<br />
If File.Attributes And 2 Then strFileAttributes = strFileAttributes & " Hidden"<br />
if File.Attributes AND 4 then wscript.Echo " System"<br />
If File.Attributes And 4 Then strFileAttributes = strFileAttributes & " System"<br />
if File.Attributes And 8 Then wscript.Echo " Volume"<br />
If File.Attributes And 8 Then strFileAttributes = strFileAttributes & " Volume"<br />
if File.Attributes AND 16 then wscript.Echo " Directory"<br />
If File.Attributes And 16 Then strFileAttributes = strFileAttributes & " Directory"<br />
if File.Attributes And 32 Then wscript.Echo " Archive Bit is set"<br />
If File.Attributes And 32 Then strFileAttributes = strFileAttributes & " Archive Bit is set"<br />
If File.Attributes AND 1024 then wscript.Echo " Alias"<br />
If File.Attributes And 1024 Then strFileAttributes = strFileAttributes & " Alias"<br />
if File.Attributes AND 2048 then wscript.Echo " Compressed"<br />
If File.Attributes And 2048 Then strFileAttributes = strFileAttributes & " Compressed"</p>

<p>'finally, write the line to the csv file<br />
objFile.WriteLine(q & File.Path & _<br />
			q & "," & q & File.Name & q & "," & _<br />
			q & File.DateCreated & q & "," & q & File.DateLastAccessed & q & "," & q _<br />
			 & File.DateLastModified & q & "," & q & File.Size & q & "," & q & strFingerPrint & q & "," & q & strFileAttributes & q)</p>

<p>Next<br />
'process Subfolders<br />
Call ProcessSubFolders(objFolder)</p>

<p>End Sub</p>

<p>Sub ProcessSubFolders(objFolder)<br />
Set colSubs=objFolder.SubFolders<br />
For Each folder In colSubs<br />
    ProcessFiles(folder)<br />
Next</p>

<p>End Sub</p>

</pre>]]></description>
            <link>http://cw.sampas.net/blog/2011/05/vbscript-md5-sum-and-file-deta.html</link>
            <guid>http://cw.sampas.net/blog/2011/05/vbscript-md5-sum-and-file-deta.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
            <pubDate>Fri, 20 May 2011 15:32:58 -0500</pubDate>
        </item>
        
        <item>
            <title>Upgrading to Gallery3</title>
            <description><![CDATA[<p>So far, so good for the upgrade from Gallery2 to <a href="http://cw.sampas.net/gallery3">Gallery3</a>. The new Google Earth feature integrates even better than the semi-supported ad-on for Gallery2. It makes it worth it to get a GPS attachment for your camera.</p>

<p>Still tough: mod_rewrite rules to make search engines happy. It also requires a PHP pagination code update, and navigation is still broken on one return link.</p>

<p>All in all, I've done far less syncing of directories and hand-editing of files to upgrade from 2 to 3 than I did from 1 to 2. Then again, I'm not all there yet.</p>]]></description>
            <link>http://cw.sampas.net/blog/2011/02/upgrading-to-gallery3.html</link>
            <guid>http://cw.sampas.net/blog/2011/02/upgrading-to-gallery3.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">Gallery3 GIS</category>
            
            <pubDate>Mon, 07 Feb 2011 22:53:22 -0500</pubDate>
        </item>
        
        <item>
            <title>I publish my own weather station data on the web</title>
            <description><![CDATA[<p>I finally got my weather station <a href="http://cw.sampas.net/weather/">published to the web</a>. Thanks to <a href="http://www.wviewweather.com/">wview</a> and <a href="http://www.davisnet.com">Davis</a>, you can see the temperature at my house. The install went fairly easily, with just one non-rpm'ed/yum prerequisite (<a href="http://www.radlib.teel.ws/">radlib</a>) requiring an install from source, along with wview. The first install didn't connect to sqlite correctly, but I fixed that with a fresh install and skipping wview's Davis-station specific setup. I am also considering migrating to Debian, but that's another topic.</p>

<p>I love the data views that wview provides. It shows trends at a glance that weather.com, NOAA, and NWS don't. Even online weather airport stations have no view that will let you see a trend -- they're all snapshots. With wview, I can tell when the temperature-dewpoint spread is closing.</p>

<p>The best part -- I can collect the data. I can export to MySQL. I can collect solar radiation stats to see if solar panels make sense at my location.</p>

<p>Next: Dial-in weather with <a href="https://www.asterisk.org/">Asterisk</a> and <a href="http://www.cepstral.com/">Cepstral</a>. </p>]]></description>
            <link>http://cw.sampas.net/blog/2010/11/i-publish-my-own-weather-stati.html</link>
            <guid>http://cw.sampas.net/blog/2010/11/i-publish-my-own-weather-stati.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Random</category>
            
            
            <pubDate>Sun, 21 Nov 2010 22:32:44 -0500</pubDate>
        </item>
        
        <item>
            <title>Upgrading to Asterisk 1.8 x64 Gotchas</title>
            <description><![CDATA[<p>I've been running <a href="http://www.digium.com/en/">Asterisk</a> at home for a couple of years now. The initial setup using <a href="http://www.pbxinaflash.com/">pbxinaflash</a> was super-quick and provided a ton of cool features out of the box. Some other stuff needing tweaking, like the analog cards. (FYI: <a href="http://www.pbxinaflash.com/">PBXIAF</a> runs on top of <a href="http://www.freepbx.org/">FreePBX</a>, which runs on top of <a href="http://www.digium.com/en/">Asterisk</a>.)</p>

<p>So a few days ago, <a href="http://www.pbxinaflash.com/">PBXInAFlash,</a> releases a new version that includes support for video calls using <a href="http://cgi.ebay.com/H-264-IP-1535-NTEX02BAE6-SIP-VIDEO-PHONE-IP1535-WIFI-/230453001282?pt=LH_DefaultDomain_0&hash=item35a811bc42#ht_4036wt_1078">discounted hardware video phones</a>. Video calls have been available forever using software and computer cams. The availability of an affordable hardware phone means that there's a chance I can give one to my mom. What's the big deal with a hardware phone? My mom already knows how to use it. Everybody knows how to answer a hard phone.</p>

<p>Upgrading. The "supported " procedure is to upgrade to the same version of FreePBX that you'll be restoring to, and then do a backup. (Upgrade using module admin, then use the backup module...) So I installed the new release on top of my old Atom D510 server and wiped out all the old data. Restore. Restart Asterisk. Asterisk seg fault crash loop. FreePBX 2.8 doesn't validate every piece of input perfectly, so it can crash. You've been warned. I reinstalled and built from scratch, which is a great thing to be able to do, but not so great from a time perspective.</p>

<p>After installing the base phone system, it was up and running. My custom apps were not. The PBXinaFlash cust app scripts don't all support Asterisk 1.8 or x64. I run a few, and this is how I fixed them. <br />
<ol><br />
	<li>xtide. I go to the beach and I love xtide. PBXIAF tries to install the 386 rpms. Just go to <a href="http://www.flaterco.com/xtide/files.html">Flaterco</a>, down load the source and compile. Follow the instructions to the letter. ./configure will work but make will fail because you are missing headers. Install the following packages with yum install xxx:<br />
   libXt-devel-1.0.2-3.2.el5.x86_64<br />
   libICE-devel-1.0.1-2.1.x86_64<br />
   libXaw-1.0.2-8.1.i386<br />
   libXt-devel-1.0.2-3.2.el5.i386<br />
   libXaw-devel-1.0.2-8.1.i386<br />
   libXpm-devel-3.5.5-3.x86_64<br />
   libXpm-3.5.5-3.i386<br />
   libXmu-1.0.2-5.i386<br />
   libSM-devel-1.0.1-3.1.x86_64<br />
   libXmu-devel-1.0.2-5.x86_64<br />
   xorg-x11-util-macros-1.0.2-4.fc6.x86_64<br />
   libXaw-devel-1.0.2-8.1.x86_64<br />
Then make and make install. Then you'll get another error from bad linking, which will look something like this: error while loading shared libraries: xxx.so.1: cannot open shared object file: No such file or directory. Use ldd on the tide command to see what's missing, then find that file and copy it to where the other ones are. It should look something like this:<br />
ldd /usr/local/bin/tide<br><br />
        libtcd.so.1 => /usr/lib64/libtcd.so.1<br />
        libpng12.so.0 => /usr/lib64/libpng12.so.0<br />
        libz.so.1 => /usr/lib64/libz.so.1<br />
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6<br />
        libm.so.6 => /lib64/libm.so.6<br />
        libgcc_s.so.1 => /lib64/libgcc_s.so.1<br />
        libc.so.6 => /lib64/libc.so.6<br />
        /lib64/ld-linux-x86-64.so.2<br />
I think my command was copying libtcd.so.1 to /usr/lib64, where it was expected. Now xtide works. I also have an updated <a href="http://www.flaterco.com/xtide/files.html#harmonicsfiles">harmonics file</a>.<br />
  </li><br />
<li> Swift. I love Allison-8kHz. All my licenses were gone -- g729 as well as Cepstral. Thanks to gmail, I could recover them all, and got a free upgrade to the latest Cepstral Allison: Allison-8kHz for Linux (v5.x), which installed fine. The missing part was swift-app for Asterisk. <a href="http://forge.asterisk.org/gf/project/app_swift/frs/?action=FrsReleaseView&frs_package_id=10&release_id=110">There's a beta for that that's working.</a> </li><br />
<li>That darn analog cards. I light up my home's antique POTS lines with a <a href="http://www.digium.com/en/products/analog/tdm410.php">Digium 410</a> and a couple of FXO modules. These were a pain to set up in the initial version, too. Since then, Asterisk has moved from the ZAP architecture to DAHDI, and I though that was where my problem was. Wrong. My problem was the same one that I had the first time. Default settings are for KewlStart instead of LoopStart. Once I changed all the configs to FXO_LS instead of FXO_KS it worked again. This means I can use my antique rotary-dial phone with mechanical bells to dial out my SIP trunk.</li><br />
<li>The IAX trunk to my Mom's house stopped working. I run this over a vpn link. (IPSec ESP w/AES256 so noone can listen in....) FreePBX has a new interface for configuring trunks, inbound and outbound in separate sections. (User and Peer). Keep you configs straight with <a href="http://www.cadvision.com/blanchas/Asterisk/IAX2Trunk.html">ServerA/UserA at one end and ServerB/UserB</a> at the other. Then I could dial my mom, but she couldn't dial me. My version of Asterisk requires CallTokens by default. Turned that off in the trunk config and it worked again. (I'd have to implement CallTokens if it wasn't running over a VPN and I wanted to resist DOS attacks.)  </li><br />
<li>Video Calls. No problems here -- just enable h.263 and configure the phones.I can even do video calls between the Nortel IP 1535 and the Bria Softphone.</li><br />
</ol></p>]]></description>
            <link>http://cw.sampas.net/blog/2010/11/upgrading-to-asterisk-18-x64-g.html</link>
            <guid>http://cw.sampas.net/blog/2010/11/upgrading-to-asterisk-18-x64-g.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">Asterisk</category>
            
            <pubDate>Sun, 14 Nov 2010 10:41:11 -0500</pubDate>
        </item>
        
        <item>
            <title>Top 5 things to do with cheap Intel Atom servers and Free Software</title>
            <description><![CDATA[<p>Intel introduced the low-power, affordable Atom chipset a couple years ago. The earlier models included the Atom 230 and <a href="http://ark.intel.com/Product.aspx?id=35641">330</a>, running single and dual-cores, respectively, at 1.6 GHz. Frugal with power at 8 watts, it could even run 64-bit. The first-gen Atom motherboards/chipset kits had two chief weaknesses: they maxed out at 2 GB of RAM, and they used RealTec network-interface cards (at least the Supermicro mboards did). RealTecs sometimes <a href="https://bugs.launchpad.net/linux/+bug/347711">crash Linux</a> when the incorrect driver loads, and the RT NICs don't do jumbo frames. The crashes are patchable but it adds a couple hours to your install. (Do not, repeat not, buy the old models no matter how cheap they are. Stick to the D510 series.)</p>

<p>Intel has since released the <a href="http://ark.intel.com/Product.aspx?id=43098">Atom D510</a>. The processor is up to a 13-watt draw, runs at about the same speed, and still runs 64-bit. What makes these chipsets better is that they max out at 4 GB of RAM and use genuine Intel Gig NICs that are widely supported and can run jumbo frames. This is a big leap, because the configured price of a fully-built mini-server around the platform remains the same. Supermicro has some great Atom motherboards that can support a home or small office doing various things. (The D525 has since come out. <a href="http://ark.intel.com/Compare.aspx?ids=49490,43098">Compare the two here</a>.)</p>

<p>Newegg has some good deals on the <a href="http://www.newegg.com/Product/ComboBundleDetails.aspx?ItemList=Combo.539630">Supermicro Atom Rack Server</a> and the <a href="http://www.newegg.com/Product/ComboBundleDetails.aspx?ItemList=Combo.539627">tower server</a> for about $70 less. Or you can just buy a <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813182234&cm_re=supermicro_atom-_-13-182-234-_-Product">motherboard</a> and roll your own. My tower server with D510 runs just under 40 watts with 4 GB of RAM, CD, and hard disk.</p>

<p>What can you do with it? There are a number of Linux and BSD appliances that are free.<br />
<strong><br />
1) Run your own telephone switch</strong>.<a href="http://www.freepbx.org/download-freepbx"> FreePBX</a> is an awesome, OS-included version of Asterisk that has a clean web GUI. <a href="http://www.pbxinaflash.com/">PBX-In-a-flash</a> is based on FreePBX but has a few extras (nonstandard enhancements like dial weather by airport code and dial your local tide schedule) thrown in. Why would you want to run your own PBX? You can do stupid phone tricks, like really cheap phone service at $.01/minute and $1.50/month per number with <a href="http://www.vitelity.net/">Vitelity</a>, for one. Or your own conference line. Or your own trunks over VPNs to other offices. Or just blacklist phone numbers and send telemarketers to their own <a href="http://www.voip-info.org/wiki/view/Asterisk+Telemarketer+Torture">voice-mail hell</a>. </p>

<p>Keep in mind that to light up your home phone lines, you may need an additional analog card from <a href="http://www.sangoma.com/products/hardware_products/analog_telephony/b600.html">Sangoma</a> or <a href="http://www.digium.com/en/products/analog/aex410.php">Digium</a>. (<a href="http://www.3cx.com/PBX/FXS-FXO.html">FXS and FXO</a> are different, but can run on the same card.)  Once you figure out how cool SIP is, you'll want to replace your house phones with <a href="http://www.aastra.com/products-mobility-families.htm?curr_cat=SIP+Telephones&curr_type=Family&mode_f=1&mode_c=1&mode_l=2">SIP phones</a>. However, you can get started with SIP free using the <a href="http://www.counterpath.com/x-lite.html">Xlite soft phone</a>. The <a href="http://itunes.apple.com/app/bria-iphone-edition/id373968636?mt=8">iPhone/iPod/iPad version</a> is $7.99. It's perfectly true that you can make phone calls cheap with a <a href="http://www.cisco.com/en/US/products/ps10029/index.html">Linksys PAP2T</a> or <a href="http://www.vonage.com/">Vonage</a>, but if you're a telephone control freak and want to wage war on telemarketers, Asterisk is for you.</p>

<p><strong>2) Run a great firewall like <a href="http://www.pfsense.org">pfSense</a></strong>. It's based on FreeBSD but has a great Web GUI so you can avoid learning the subtle differences between BSD and Linux. pfSense comes in embedded and full. For the Atom server, running the full version is no sweat. And I run <a href="http://www.snort.org/">SNORT</a> inline on two interfaces with no issues. A full SNORT IPS signature subscription for <a href="http://www.snort.org/vrt/buy-a-subscription/">home use is just $30/year</a>. And pfSense does not just IPSEC point-to-point VPNs, but also WebVPN. Try that on your <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16833120356&nm_mc=OTC-Froogle&cm_mmc=OTC-Froogle-_-Network+-+Firewalls-_-Cisco+Systems++Inc.-_-33120356">Cisco ASA 5505</a>, and you'll be paying a couple grand for the equipment, licenses, and subscription. Check out the plugins for pfSense and you'll see how much you can do with one small box. pfSense 2.0 is almost out of beta and there's a 64-bit version. (Plugins include <a href="http://www.freeswitch.org/">FreeSwitch</a>, an open-source competitor to (open-source) Asterisk, so if you want, you can even run a PBX on your firewall.)</p>

<p><strong>3) Storage: Run <a href="http://freenas.org/">FreeNAS</a> and you'll be able to scale reasonably out of the box. </strong>The Atom Motherboard has six SATA slots and two GB NICs that do jumbo frames. Hello iSCSI. With 2TB disks, that's 12 TB of storage. FreeNAS offers CIFS (Windows), Apple (AFP), iSCSI, and NFS mount points. Add a serious <a href="http://shop.ebay.com/items/3ware%209650se?_dmd=1&_sop=12&rvr_id=164118164671&keyword=3ware+9650se&geo_id=1&crlp=7039119673_1&MT_ID=340&tt_encode=raw">SATA RAID</a> card to get even more disk IO performance out of your little Atom box. Obviously, I would recommend the tower server case for FreeNAS because it has room for more disks.</p>

<p><strong>4) Run Apache/PHP/MySQL applications</strong>. Run Fedora, CentOS, whatever. You can run your own apps at home on top of your favorite flavor of Linux/BSD. One of my favorites is <a href="http://gallery.menalto.com/">Gallery2</a>. There's even semi-free apps (free for no enterprise features) like <a href="http://www.movabletype.com/">Movable Type</a> (you're reading this on an MT platform), and even run more than one on the same mini-Server.</p>

<p><strong>5) Collect data.</strong> Run a <a href="http://www.wviewweather.com/">weather station</a>. Run a <a href="http://www.balabit.com/network-security/syslog-ng/">log server</a>. Run a crazy blog and see who hits it with which keywords. Collect IPS events from multiple firewalls and <a href="http://www.dshield.org/">correlate them</a>. </p>]]></description>
            <link>http://cw.sampas.net/blog/2010/11/top-5-things-to-do.html</link>
            <guid>http://cw.sampas.net/blog/2010/11/top-5-things-to-do.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Grad School</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Programming</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Random</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">Atom Asterisk pfsense</category>
            
            <pubDate>Sat, 06 Nov 2010 14:08:10 -0500</pubDate>
        </item>
        
        <item>
            <title>Restricted Airspace Updates: new KML files for Google Earth</title>
            <description><![CDATA[<p>I have updated the KML files for US special use airspace files again. After looking around for some prohibited areas with which I am familiar, I noticed they were missing. They weren't missing in the file, but when a different type of restricted airspace overlies a prohibited area, you can't see the prohibited area in Google Earth. Thus I have created a <a href="http://cw.sampas.net/kml/US_Prohibited_Airspace_20100923.kml">prohibited-area-only KML file</a>. The <a href="http://cw.sampas.net/kml/US_Special_Use_Airspace_20100923.kml">special use file</a> includes all of the different types of special use areas, including the prohibited areas. As usual, all of them are in the <a href="http://cw.sampas.net/kml">kml file archive</a>, which is sortable by date using the smart index feature of Apache.</p>

<p>Also, when you use FAA data, be sure to escape special SQL characters in the names. I think there's an O'Brien restricted area. Be aware, there are single quotes in special use area names.</p>]]></description>
            <link>http://cw.sampas.net/blog/2010/10/restricted-airspace-updates-ne.html</link>
            <guid>http://cw.sampas.net/blog/2010/10/restricted-airspace-updates-ne.html</guid>
            
            
            <pubDate>Mon, 04 Oct 2010 21:10:49 -0500</pubDate>
        </item>
        
        <item>
            <title>View Airport Weather Stations in Google Earth: Updated AWOS KML file</title>
            <description><![CDATA[<p>I have an updated AWOS KML file that will show you the telephone number, frequency, and AWOS type for the airports listed in the FAA's AWOS text file. You can <a href="http://cw.sampas.net/kml/awos_directory_20100923-20101118.kml">download it here</a>. As always, the <a href="http://cw.sampas.net/kml">KML archive is here</a>.</p>

<p>This file uses the airport's latitute and longitude rather than the AWOS' latitude and longitude, which is missing in some cases in the FAA's file.</p>

<p>Also, the FAA files seem to have arbitrary layout changes from release to release, as well as some data quality issues. (Missing data, data out of alignment, etc.) I'm glad I don't have to produce this stuff on deadline.</p>]]></description>
            <link>http://cw.sampas.net/blog/2010/10/view-airport-weather-stations-.html</link>
            <guid>http://cw.sampas.net/blog/2010/10/view-airport-weather-stations-.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Aviation</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">GIS</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">KML airpsace</category>
            
            <pubDate>Sun, 03 Oct 2010 22:39:01 -0500</pubDate>
        </item>
        
        <item>
            <title>Updated Special Use Airspace KML</title>
            <description><![CDATA[<p>After losing a disk, I finally got around to rebuilding the database and scripts to generate KML files from the FAA's NFDC subscription. First to be redone is the<a href="http://cw.sampas.net/kml/US_Special_Use_Airspace_July_29__2010_-_September_23__2010.kml"> Special Use Airspace KML</a>. Microsoft's SQL Server 2008 does a far better job of importing files than SQL 2005 did.  The <a href="http://cw.sampas.net/kml">airspace KML archive is here</a>.</p>]]></description>
            <link>http://cw.sampas.net/blog/2010/08/updated-special-use-airspace-k.html</link>
            <guid>http://cw.sampas.net/blog/2010/08/updated-special-use-airspace-k.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Aviation</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">GIS</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">KML Airspace</category>
            
            <pubDate>Sat, 07 Aug 2010 19:48:46 -0500</pubDate>
        </item>
        
        <item>
            <title>Upgrading to MT 5: Comment Login via...</title>
            <description><![CDATA[<p>I just upgraded to Movable Type 5, and I'm testing the different comment sign-in possiblities. MT5 supports OpenID, LiveJournal, Vox, TypePad, Google, Yahoo, AIM, Wordpress.com, Yahoo!JAPAN, livedoor, and Hatena. You'll see these choices if you hit the sign in link below.</p>

<p>I have also enabled SSL with a self-signed cert, so if you're shy about signing in to comment via http, just switch it to https by typing the s in your link bar. And no, I have not found a way to globally change signins to SSL in MT 5.</p>]]></description>
            <link>http://cw.sampas.net/blog/2010/06/upgrading-to-mt-5-comment-logi.html</link>
            <guid>http://cw.sampas.net/blog/2010/06/upgrading-to-mt-5-comment-logi.html</guid>
            
            
            <pubDate>Tue, 08 Jun 2010 12:36:25 -0500</pubDate>
        </item>
        
        <item>
            <title>How to dial up encryption so high in Apache that it breaks IE and Chrome</title>
            <description><![CDATA[<p>So you want to require strong encryption in Apache's httpd 2.0? So strong that Firefox is the only browser that can connect?<br />
In /etc/httpd/conf.d/ssl.conf, edit the two lines as below:<br />
SSLProtocol TLSv1<br />
SSLCipherSuite HIGH<br />
Then go to <br />
/etc/httpd/conf/httpd.conf and edit your <PRE>&#60;Directory> &#60;/Directory> </PRE>to include the following line:<br />
    SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 256<br />
Then <br />
apachectl configtest<br />
to check for typos.<br />
Finally<br />
/etc/rc.d/init.d/httpd restart</p>

<p>What this does is make browsers do <br />
TLSv1 DHE-RSA-CAMELLIA256-SHA only.</p>

<p>You can then watch your SSL handshakes fail from IE and Chrome. If you want to require strong encryption across browsers, edit ssl.conf to look like this:</p>

<p>SSLProtocol TLSv1<br />
SSLCipherSuite AES256-SHA</p>

<p>Then you'll have reasonably strong encryption.</p>]]></description>
            <link>http://cw.sampas.net/blog/2010/06/how-to-dial-up-encryption-so-h.html</link>
            <guid>http://cw.sampas.net/blog/2010/06/how-to-dial-up-encryption-so-h.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Security</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">Security</category>
            
            <pubDate>Fri, 04 Jun 2010 16:14:45 -0500</pubDate>
        </item>
        
        <item>
            <title>How Microsoft does security monitoring.</title>
            <description><![CDATA[<p><a href="http://technet.microsoft.com/en-us/library/ee943799.aspx">Great article by Microsoft</a> on their internal monitoring structure and organization.</p>]]></description>
            <link>http://cw.sampas.net/blog/2010/02/how-microsoft-does-security-mo.html</link>
            <guid>http://cw.sampas.net/blog/2010/02/how-microsoft-does-security-mo.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">Microsoft Security</category>
            
            <pubDate>Tue, 02 Feb 2010 08:49:21 -0500</pubDate>
        </item>
        
        <item>
            <title>Commuter Bicycle Review: Breezer Uptown 8</title>
            <description><![CDATA[<p>After a year-and-a-half and over 1,000 miles on the <a href="http://www.breezerbikes.com/bike_details.cfm?bikeType=town&frame=d&bike=uptown">Breezer Uptown 8</a>, I thought I'd write a review. There is a dearth of material on <a href="http://www.bicycling.com/article/1,6610,s1-1-324-15818-1,00.html">commuter bicycles</a> and bicycling. The trade press is advertiser-focused and almost all of their bicycle reviews are non-critical and improve as the price increases. Most bicycle stores don't focus on the commuter cycle market segment. If one store started doing it in or around DC, I suspect they'd get a hardcore following pretty quick. There's a rush-hour on the <a href="http://www.cctrail.org/">CCT</a> even in the winter. (<a href="http://gearjunkie.com/winter-bike-commuting-10-tips-to-ride-safe">Minneapolis claims 3,000 winter bicycle commuters</a> -- they plow 50 miles of bicycle trails there.)</p>

<p>First: my ride. On days that I ride (I'm not a 5-day-a-week rider yet), I ride seven miles (mostly downhill) into work in 35 minutes. That same ride home (mostly uphill) takes about 45 minutes. I carry a laptop and a full set of work clothes each way in panniers on a rack.</p>

<p>Overall, the Breezer Uptown 8 is a great bicycle. However, there are some things to nit-pick about, mostly because commuter bicycles are relatively new in the United States. Nobody reviews them because they're not sexy. </p>

<p>First off, the Uptown is comfortable. I ride in an upright position. The seatpost is suspended, and overall it's a pleasure to ride. However, it's not a fast bike. It's got full fenders and a fully-enclosed chaincase. The only place I get splashed in rain is my feet. </p>

<p>The built-in Shimano front hub generator and lights are great. The headlight is pretty bright. I did get a <a href="http://www.niterider.com/#">Niterider</a> light because the trail is not lit and pitch black. The rear light connections are weak and the light failed after going over a few bumps. Some new wire fixed that. The generator does add a little drag when it turns itself on. It's great having lights without ever having to worry about a charger or batteries. I have two Planet Bike flashies (one works consisently) mounted on my panniers. That worked out especially well after I wrecked and my black laptop pannier fell off and onto the dark, unlit trail at night.</p>

<p>The stock tires, Schwalbe City, are heavy. I replaced the front with a Conti 1" which works fine. The rear tire I haven't replaced because the rear wheel is a pain to take off. You need to shift to 4th gear, remove the tiny screws in the chaincase, and then use a 15mm wrench. Not something to do on the trail after dark.</p>

<p>You can see photos of my <a href="http://cw.sampas.net/gallery2/v/breezer/">nitpicks here</a>.</p>

<p>I bought the bike at <a href="http://www.bikesatvienna.com/products">Bikes at Vienna</a> in Vienna, and get some help with maintenance from <a href="http://griffincycle.com/">Griffin Cycle</a> in Bethesda. There's nothing wrong with the service at Bikes at Viennna, it's just that Griffin Cycles is close to home.</p>]]></description>
            <link>http://cw.sampas.net/blog/2009/12/commuter-bicycle-review-breeze.html</link>
            <guid>http://cw.sampas.net/blog/2009/12/commuter-bicycle-review-breeze.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">Commuting by Bicycle</category>
            
            <pubDate>Wed, 02 Dec 2009 10:24:07 -0500</pubDate>
        </item>
        
        <item>
            <title>Airspace KML files updated for the December 17 cycle</title>
            <description><![CDATA[<p>I updated the airspace KML files again -- skipping one release. The latest covers from December 17, 2009 throughFebruary 11, 2010. You can find them in the <a href="http://cw.sampas.net/kml/">archive here</a>.</p>]]></description>
            <link>http://cw.sampas.net/blog/2009/11/airspace-kml-files-updated-for.html</link>
            <guid>http://cw.sampas.net/blog/2009/11/airspace-kml-files-updated-for.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Aviation</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">GIS</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">airsapce kml</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">kml</category>
            
            <pubDate>Sun, 22 Nov 2009 14:30:18 -0500</pubDate>
        </item>
        
        <item>
            <title>Migrating Movable Type and Gallery2 to a new (Fedora) server</title>
            <description><![CDATA[<p>I loved my Dell 1750 server. It has plenty of power and a great <a href="http://www.3ware.com/products/serial_ata8000.asp">3Ware RAID card</a>, two 500 GB RAID-1 drives, 4 GB RAM, and ran Red Hat Linux. I bought it from the <a href="http://www.dell.com/outlet">Dell Outlet</a> site several years ago when my condo fee included electric. Since then I have moved. I pay my own electric bill, and my 1750 <a href="http://www.powermeterstore.com/p1206/watts_up_pro.php">consumes 150 watts at idle</a>. When I publish with <a href="http://www.movabletype.com/">Movable Type</a> or <a href="http://gallery.menalto.com/">Gallery</a>, power consumption exceeds 200 watts. I pay $0.150845894 per kilowatt-hour. (That's summing the separate generation, transmission, distribution, demand-side surcharge, and adding the gross-receipts tax. Pepco doens't make it easy to figure out what you're paying.) With a thirty-day month, that's 108 kwh, which comes to $16.29135658. That's $16/month, just for idling. And that doesn't use the noise of the server in my office or the additional AC required in summer. </p>
 
<p>That may seem expensive, but it's far cheaper than getting that much server capacity at <a href="http://www.rackspace.com/managed_hosting/configurations.php">Rackspace</a>. However, I don't need that much capacity. I can trade processor power for power savings, keep the disk space and RAID card, and switch to an Atom-based server. My current FreePBX Atom server runs at 40 watts with an analog card powering two FXS modules. I bet I can match that on a new server. I'd get the new <a href="http://www.supermicro.com/newsroom/pressreleases/2009/press050409.cfm">Supermicro Atom Server</a>, but it has space for only one 3.5 inch hard drive. I need two. Thus I'll be using another miniITX case. In the meantime, everything's running on another old Dell tower box.</p>

<p>How did I move it? First I though reinstalling all the software from scratch would be a good idea. I'd get a nice clean, efficient build. But that took way too long, and I'd have to re-customize my templates and tweaks. I had MySQL backups running for a while, why not start testing the restores? I used rsync:<br>
<pre><blockquote>rsync -avz /var/www/ -e ssh:user@mynewserver /var/www/</blockquote></pre><br>
(Note: Please study <a href="http://samba.org/rsync/">rsync syntax</a>. Those /  at the ends make a big difference.)
It worked. Next I had to tweak the new httpd.conf file. I couldn't just copy the old one, because I was using the latest Apache version. But I could use almost all of the old file. I just needed to adjust the modules it loaded, because several have changed names. </p>

<p>Then I restored the databases: <p>
<pre><blockquote>mysql -u root -p</blockquote></pre><br>
	enter your password. (You ARE using a PW for MySQL root, aren't you?)<br>
<pre><blockquote>mysql> create database mynewdb</blockquote></pre><br>
	then <br>
<pre><blockquote>mysql> quit;</blockquote></pre><br>
	then<br>
<pre><blockquote>$ mysql -u root -p [mynewdb] < [backupfile.sql]</blockquote></pre><br>

But that generally does not restore your user privs on the db. Back to mysql:<br>
<pre><blockquote>mysql -u root -p</blockquote></pre><br>
	then<br>
<pre><blockquote>mysql> use mynewdb;<br>
mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'localhost' <br>
IDENTIFIED BY 'pAssW0rd' WITH GRANT OPTION;<br>
mysql> flush privileges;</blockquote></pre><br>
	Don't forget the above step or you'll need to restart MySQL to get it to work.
<pre><blockquote>mysql> quit;</blockquote></pre><br></p>

<p>Then double check that the user and pass from above match your config files. </p>

<p>Finally, test your applications. Gallery2 and MovableType worked fine. Your milage may vary. My office is almost silent now.</p>]]></description>
            <link>http://cw.sampas.net/blog/2009/11/migrating-movable-type-and-gal.html</link>
            <guid>http://cw.sampas.net/blog/2009/11/migrating-movable-type-and-gal.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">Random</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">server migration</category>
            
            <pubDate>Fri, 20 Nov 2009 09:44:37 -0500</pubDate>
        </item>
        
    </channel>
</rss>

