<?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>Steve Jenkins&#039; Blog &#187; Reference</title>
	<atom:link href="http://stevejenkins.com/blog/category/reference/feed/" rel="self" type="application/rss+xml" />
	<link>http://stevejenkins.com/blog</link>
	<description>Tech articles, product reviews, and other geeky stuff.</description>
	<lastBuildDate>Thu, 17 May 2012 18:41:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Fixing WordPress Admin Issues with CloudFlare Page Rules</title>
		<link>http://stevejenkins.com/blog/2012/05/fixing-wordpress-admin-issues-with-cloudflare-page-rules/</link>
		<comments>http://stevejenkins.com/blog/2012/05/fixing-wordpress-admin-issues-with-cloudflare-page-rules/#comments</comments>
		<pubDate>Mon, 07 May 2012 19:11:14 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[CloudFlare]]></category>
		<category><![CDATA[Page Rule]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1873</guid>
		<description><![CDATA[I&#8217;ve been noticing some wonkiness with the admin area of our WordPress blog at CheatCodes.com EXTRA!. Through some experimentation, I noticed that all of the issues went away if I put CloudFlare into Development Mode. This, however, isn&#8217;t a long-term fix, so I decided to create a CloudFlare Page Rule for the /wp-admin/ directory. To do [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/06/fixing-postfix-certificate-verification-failed-for-gmail-untrusted-issuer-error-message/' rel='bookmark' title='Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message'>Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/installing-my-2nd-ecobee-and-using-group-admin-features/' rel='bookmark' title='Installing my 2nd ecobee and Using Group Admin Features'>Installing my 2nd ecobee and Using Group Admin Features</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/' rel='bookmark' title='How to Install APC (Alternative PHP Cache) on CentOS 5.6'>How to Install APC (Alternative PHP Cache) on CentOS 5.6</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1874" style="line-height: 18px;" title="CloudFlare" src="http://stevejenkins.com/blog/wp-content/uploads/2012/05/cloudflare-main-300x205.png" alt="" width="300" height="205" /></p>
<p>I&#8217;ve been noticing some wonkiness with the admin area of our WordPress blog at <a target="_blank" href="http://cheatcodes.com/extra/" target="_blank">CheatCodes.com EXTRA!</a>. Through some experimentation, I noticed that all of the issues went away if I put CloudFlare into Development Mode. This, however, isn&#8217;t a long-term fix, so I decided to create a CloudFlare Page Rule for the /wp-admin/ directory. To do this, just login to CloudFlare and create a Page Rule that covers:</p>
<pre>http://example.com/wp-admin/*</pre>
<p>Then turn off EVERYTHING: apps, cache, security, always on, etc.</p>
<p>This fixed <em>mos</em>t of my problem, but I noticed that I still had issues when logging in or out of the WordPress admin area, and I couldn&#8217;t figure out why.</p>
<p>Then it hit me &#8211; the login page for the WordPress admin area isn&#8217;t <em>in</em> the WordPress admin area, and therefore wasn&#8217;t covered by my CloudFlare Page Rule! Instead, the WordPress login page is here:</p>
<pre>http://example.com/wp-login.php</pre>
<p>So I added a second page rule that covered:</p>
<pre>http://example.com/wp-login.php*</pre>
<p>The asterisk is necessary to cover URLs such as:</p>
<pre>http://example.com/wp-login.php?loggedout=true</pre>
<p>Now the login/logout hangs and other strange behavior are gone, my WordPress admin area works great for all our authors, and I&#8217;m still benefitting from CloudFlare protection and optimization across the rest of the blog.</p>
<p>So if you&#8217;re noticing strangeness between WordPress and CloudFlare, create a Page Rule!</p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/06/fixing-postfix-certificate-verification-failed-for-gmail-untrusted-issuer-error-message/' rel='bookmark' title='Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message'>Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/installing-my-2nd-ecobee-and-using-group-admin-features/' rel='bookmark' title='Installing my 2nd ecobee and Using Group Admin Features'>Installing my 2nd ecobee and Using Group Admin Features</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/' rel='bookmark' title='How to Install APC (Alternative PHP Cache) on CentOS 5.6'>How to Install APC (Alternative PHP Cache) on CentOS 5.6</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2012/05/fixing-wordpress-admin-issues-with-cloudflare-page-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Adjust the Clock on a Panasonic Hybrid Phone System</title>
		<link>http://stevejenkins.com/blog/2012/03/how-to-adjust-the-clock-on-a-panasonic-hybrid-phone-system/</link>
		<comments>http://stevejenkins.com/blog/2012/03/how-to-adjust-the-clock-on-a-panasonic-hybrid-phone-system/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 16:02:53 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[adjust]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[daylight savings time]]></category>
		<category><![CDATA[hybrid]]></category>
		<category><![CDATA[Panasonic]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[phone system]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1856</guid>
		<description><![CDATA[This is one of those blog posts that&#8217;s almost 100% for my own benefit, since twice a year I have to fumble around with my phone system trying to remember how to adjust the clock to and from Daylight Savings Time. Of course, this would be easier if I knew where I&#8217;d put the paper [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2012/03/how-to-disable-phone-options-on-a-dsc-alarm-panel-when-converting-to-envisalink-internet-alarm-monitoring/' rel='bookmark' title='How to Disable Phone Options on a DSC Alarm Panel when Converting to Envisalink Internet Alarm Monitoring'>How to Disable Phone Options on a DSC Alarm Panel when Converting to Envisalink Internet Alarm Monitoring</a></li>
<li><a href='http://stevejenkins.com/blog/2010/11/things-i-do-first-on-a-vanilla-linux-system/' rel='bookmark' title='Things I Do First on a Vanilla Linux System'>Things I Do First on a Vanilla Linux System</a></li>
<li><a href='http://stevejenkins.com/blog/2010/12/ecobee-mothership-wont-let-my-thermostat-phone-home/' rel='bookmark' title='ecobee Mothership Won&#8217;t Let My Thermostat Phone Home'>ecobee Mothership Won&#8217;t Let My Thermostat Phone Home</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://stevejenkins.com/blog/wp-content/uploads/2012/03/KX-T7130.jpg"><img class="alignleft size-full wp-image-1862" title="Panasonic KX-T7130 Phone" src="http://stevejenkins.com/blog/wp-content/uploads/2012/03/KX-T7130.jpg" alt="" width="290" height="200" /></a>This is one of those blog posts that&#8217;s almost 100% for my own benefit, since twice a year I have to fumble around with my phone system trying to remember how to adjust the clock to and from Daylight Savings Time. Of course, this would be easier if I knew where I&#8217;d put the paper overlay that shows what each of the keys do in programming mode, but where&#8217;s the fun in that? <img src='http://stevejenkins.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here are the steps I take to adjust the clock on my Panasonic Hybrid phone system:</p>
<ol>
<li>Move the <strong>Memory</strong> button on the back of the phone from <strong>SET</strong> to <strong>PROGRAM. </strong><strong>PITS-PGM NO? -&gt;</strong> will appear on the LCD screen.</li>
<li>Type <strong>*#</strong> followed by my 4-digit password to enter programming mode. <strong>SYS-PGM NO? -&gt;</strong> will appear on the LCD screen.</li>
<li>Type <strong>000</strong>. <strong>Day/Time Set</strong> will appear on the LCD screen.</li>
<li>Hit <strong>SP-PHONE</strong> key. The screen displays the current date.</li>
<li>Hit the <strong>FORWARD</strong> button to move forward through the date and to the time.</li>
<li>When the hour is flashing, enter the correct hour. Hit <strong>FORWARD</strong> to move to the next item and adjust minutes, if necessary.</li>
<li>To save the adjusted time, hit the <strong>AUTO DIAL / STORE</strong> button. You&#8217;ll hear a long beep to confirm.</li>
<li>Move the <strong>Memory</strong> button on the back of the phone from <strong>PROGRAM</strong> to<strong> <strong>SET</strong></strong>.</li>
</ol>
<p>Your Panasonic Hybrid phone system now has the correct time!</p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2012/03/how-to-disable-phone-options-on-a-dsc-alarm-panel-when-converting-to-envisalink-internet-alarm-monitoring/' rel='bookmark' title='How to Disable Phone Options on a DSC Alarm Panel when Converting to Envisalink Internet Alarm Monitoring'>How to Disable Phone Options on a DSC Alarm Panel when Converting to Envisalink Internet Alarm Monitoring</a></li>
<li><a href='http://stevejenkins.com/blog/2010/11/things-i-do-first-on-a-vanilla-linux-system/' rel='bookmark' title='Things I Do First on a Vanilla Linux System'>Things I Do First on a Vanilla Linux System</a></li>
<li><a href='http://stevejenkins.com/blog/2010/12/ecobee-mothership-wont-let-my-thermostat-phone-home/' rel='bookmark' title='ecobee Mothership Won&#8217;t Let My Thermostat Phone Home'>ecobee Mothership Won&#8217;t Let My Thermostat Phone Home</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2012/03/how-to-adjust-the-clock-on-a-panasonic-hybrid-phone-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Disable Phone Options on a DSC Alarm Panel when Converting to Envisalink Internet Alarm Monitoring</title>
		<link>http://stevejenkins.com/blog/2012/03/how-to-disable-phone-options-on-a-dsc-alarm-panel-when-converting-to-envisalink-internet-alarm-monitoring/</link>
		<comments>http://stevejenkins.com/blog/2012/03/how-to-disable-phone-options-on-a-dsc-alarm-panel-when-converting-to-envisalink-internet-alarm-monitoring/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 18:26:00 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Product Reviews]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[2DS]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[disable telephone]]></category>
		<category><![CDATA[DSC]]></category>
		<category><![CDATA[Envisalink]]></category>
		<category><![CDATA[Eyez-On]]></category>
		<category><![CDATA[panel]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1842</guid>
		<description><![CDATA[As you may be aware from one of my previous posts, I decided to ditch both of my analog phone alarm companies in favor of digital monitoring using my Envisalink 2DS adapter which connects my DSC alarm panels to my in-home networks and, along with a host of other features, allows my alarm systems to [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/12/a-tale-of-two-alarm-monitoring-cancellation-requests-fire-protection-inc-seattle-and-mountain-west-security-provo/' rel='bookmark' title='A Tale of Two Alarm Monitoring Cancellation Requests: Fire Protection Inc (Seattle) and Mountain West Security (Provo)'>A Tale of Two Alarm Monitoring Cancellation Requests: Fire Protection Inc (Seattle) and Mountain West Security (Provo)</a></li>
<li><a href='http://stevejenkins.com/blog/2010/12/ecobee-mothership-wont-let-my-thermostat-phone-home/' rel='bookmark' title='ecobee Mothership Won&#8217;t Let My Thermostat Phone Home'>ecobee Mothership Won&#8217;t Let My Thermostat Phone Home</a></li>
<li><a href='http://stevejenkins.com/blog/2010/03/set-up-vnc-from-windows-to-fedora-12-over-the-internet/' rel='bookmark' title='Set up VNC from Windows to Fedora 12 Over the Internet'>Set up VNC from Windows to Fedora 12 Over the Internet</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://stevejenkins.com/blog/wp-content/uploads/2012/03/ip100upright.png"><img class="alignleft size-medium wp-image-1849" title="Envisalink 2DS" src="http://stevejenkins.com/blog/wp-content/uploads/2012/03/ip100upright-205x300.png" alt="" width="205" height="300" /></a>As you may be aware from one of my <a title="A Tale of Two Alarm Monitoring Cancellation Requests: Fire Protection Inc (Seattle) and Mountain West Security (Provo)" href="http://stevejenkins.com/blog/2011/12/a-tale-of-two-alarm-monitoring-cancellation-requests-fire-protection-inc-seattle-and-mountain-west-security-provo/" target="_blank">previous posts</a>, I decided to ditch both of my analog phone alarm companies in favor of digital monitoring using my <a href="http://www.eyez-on.com/EZMAIN/envisalink2ds.php" target="_blank">Envisalink 2DS</a> adapter which connects my DSC alarm panels to my in-home networks and, along with a host of other features, allows my alarm systems to be monitored via the Internet.</p>
<p>Envisalink, the developers of the 2DS, now offer EnvisAlarm: an alarm monitoring service that integrates wonderfully with their free ESP service, which allows users to log in from anywhere to view and control their alarm system details.</p>
<p>However, since my DSC panels were still set up to transmit alarm information via the telephone, I had to disable a few options on my DSC panels that were no longer needed now that I&#8217;m monitoring over the Internet with my 2DS. If you&#8217;re a new Envisalink monitoring customer who previously used telephone monitoring, you&#8217;ll want to following these same steps that I took to disable the phone-related options.</p>
<p>These instructions assume you&#8217;re using the factory-default Installer Code of 5555 (which you probably shouldn&#8217;t). Insert your own installer code in place of the 5555.</p>
<ul>
<li>To disable the phone line: <strong>*8 5555 015 7 ##</strong></li>
<li>To turn off test transmissions (which are no longer needed since Envisalink monitors network connection from them to your 2DS continuously): <strong>*8 5555 371 9999 ##</strong></li>
<li>To turn off the phone dialer: <strong>*8 5555 380 1 ##</strong></li>
</ul>
<p>I relied on the following online docs to help me remember the correct menu options in the DSC panel:</p>
<p><a target="_blank" href="http://www.myalarm.com/manuals_prog/832p.pdf">http://www.myalarm.com/manuals_prog/832p.pdf</a></p>
<p><a target="_blank" href="http://www.mainelectronics.com/pdf/HowToProgramDSCsystem.pdf">http://www.mainelectronics.com/pdf/HowToProgramDSCsystem.pdf</a></p>
<p>So far, I&#8217;ve been very happy with the price and service of Envisalink&#8217;s monitoring.</p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/12/a-tale-of-two-alarm-monitoring-cancellation-requests-fire-protection-inc-seattle-and-mountain-west-security-provo/' rel='bookmark' title='A Tale of Two Alarm Monitoring Cancellation Requests: Fire Protection Inc (Seattle) and Mountain West Security (Provo)'>A Tale of Two Alarm Monitoring Cancellation Requests: Fire Protection Inc (Seattle) and Mountain West Security (Provo)</a></li>
<li><a href='http://stevejenkins.com/blog/2010/12/ecobee-mothership-wont-let-my-thermostat-phone-home/' rel='bookmark' title='ecobee Mothership Won&#8217;t Let My Thermostat Phone Home'>ecobee Mothership Won&#8217;t Let My Thermostat Phone Home</a></li>
<li><a href='http://stevejenkins.com/blog/2010/03/set-up-vnc-from-windows-to-fedora-12-over-the-internet/' rel='bookmark' title='Set up VNC from Windows to Fedora 12 Over the Internet'>Set up VNC from Windows to Fedora 12 Over the Internet</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2012/03/how-to-disable-phone-options-on-a-dsc-alarm-panel-when-converting-to-envisalink-internet-alarm-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Reboot with a Bash Input/Output Error</title>
		<link>http://stevejenkins.com/blog/2012/02/how-to-reboot-with-a-bash-inputoutput-error/</link>
		<comments>http://stevejenkins.com/blog/2012/02/how-to-reboot-with-a-bash-inputoutput-error/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 02:21:07 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Input/Output]]></category>
		<category><![CDATA[reboot]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1838</guid>
		<description><![CDATA[Man &#8211; this post saved my bacon today: http://www.linuxjournal.com/content/rebooting-magic-way Was able to reboot a CentOS box with what appears to be a failing (failed?) file system. We had backups, but we&#8217;re evacuating the server now. Related posts: Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message How to set up two NICs on [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/06/fixing-postfix-certificate-verification-failed-for-gmail-untrusted-issuer-error-message/' rel='bookmark' title='Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message'>Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message</a></li>
<li><a href='http://stevejenkins.com/blog/2011/09/how-to-set-up-two-nics-on-different-subnets-with-static-routes-and-separate-default-gateways-that-remain-after-a-reboot/' rel='bookmark' title='How to set up two NICs on different subnets with static routes and separate default gateways that remain after a reboot'>How to set up two NICs on different subnets with static routes and separate default gateways that remain after a reboot</a></li>
<li><a href='http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/' rel='bookmark' title='How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup'>How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Man &#8211; this post saved my bacon today:</p>
<p><a target="_blank" href="http://www.linuxjournal.com/content/rebooting-magic-way" target="_blank">http://www.linuxjournal.com/content/rebooting-magic-way</a></p>
<p>Was able to reboot a CentOS box with what appears to be a failing (failed?) file system. We had backups, but we&#8217;re evacuating the server now. <img src='http://stevejenkins.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/06/fixing-postfix-certificate-verification-failed-for-gmail-untrusted-issuer-error-message/' rel='bookmark' title='Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message'>Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message</a></li>
<li><a href='http://stevejenkins.com/blog/2011/09/how-to-set-up-two-nics-on-different-subnets-with-static-routes-and-separate-default-gateways-that-remain-after-a-reboot/' rel='bookmark' title='How to set up two NICs on different subnets with static routes and separate default gateways that remain after a reboot'>How to set up two NICs on different subnets with static routes and separate default gateways that remain after a reboot</a></li>
<li><a href='http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/' rel='bookmark' title='How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup'>How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2012/02/how-to-reboot-with-a-bash-inputoutput-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup</title>
		<link>http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/</link>
		<comments>http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 21:42:57 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Amazon backup]]></category>
		<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[AutoMYSQLBackup]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[backup to s3]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Duplicity]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[off-site]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[S3]]></category>
		<category><![CDATA[s3 backup]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1752</guid>
		<description><![CDATA[I often say there are only two types of data: data that is backed up, and data that is waiting to be lost. Even if you&#8217;re the most contentious hax0r who always backs up your data, if your backups are stored in the same physical location as the source data, then your data is still &#8221;waiting [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/02/how-to-set-up-ushare-media-server-on-fedora-centos-to-stream-video-and-pictures-to-xbox-360-or-ps3/' rel='bookmark' title='How to set up uShare media server on Fedora / CentOS to stream video and pictures to Xbox 360 or PS3'>How to set up uShare media server on Fedora / CentOS to stream video and pictures to Xbox 360 or PS3</a></li>
<li><a href='http://stevejenkins.com/blog/2012/02/how-to-reboot-with-a-bash-inputoutput-error/' rel='bookmark' title='How to Reboot with a Bash Input/Output Error'>How to Reboot with a Bash Input/Output Error</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/installing-opendkim-rpm-via-yum-with-postfix-or-sendmail-for-rhel-centos-fedora/' rel='bookmark' title='Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)'>Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://stevejenkins.com/blog/wp-content/uploads/2011/11/backup-Cloud.jpg"><img class="size-full wp-image-1756 alignright" title="Backup... TO THE CLOUD!" src="http://stevejenkins.com/blog/wp-content/uploads/2011/11/backup-Cloud.jpg" alt="" width="380" height="316" /></a>I often say there are only two types of data: <strong>data that is backed up</strong>, and<strong> data that is waiting to be lost</strong>.</p>
<p>Even if you&#8217;re the most contentious hax0r who always backs up your data, if your backups are stored in the same physical location as the source data, then your data is <em>still</em> &#8221;waiting to be lost&#8221; in the event of a fire, flood, theft, or other disaster. By combining Amazon&#8217;s low-priced S3 (Simple Storage Solution) Cloud-based storage solution with some excellent some open source backup tools, you can now be more prepared than ever without spending a fortune.</p>
<p>This how-to demonstrates how I combined the following tools to automate my off-site backups:</p>
<ul>
<li><a target="_blank" href="http://www.amazonaws.com/" target="_blank">Amazon S3</a>: cheap, secure, redundant, off-site storage service</li>
<li><a target="_blank" href="http://sourceforge.net/projects/automysqlbackup/" target="_blank">AutoMySQLBackup</a>: free software to create backups of MySQL databases</li>
<li><a target="_blank" href="http://duplicity.nongnu.org/" target="_blank">Duplicity</a>: free software that does smart backups to remote locations</li>
<li><a target="_blank" href="http://www.gnupg.org/" target="_blank">GPG</a>: allows encryption and signing of data for privacy</li>
<li><a target="_blank" href="http://blog.damontimm.com/bash-script-incremental-encrypted-backups-duplicity-amazon-s3/" target="_blank">dt-s3-backup.sh</a>: a slick shell script that ties all these tools together</li>
</ul>
<h2>Step 1: Set up your Amazon S3 Storage Bucket</h2>
<p>I won&#8217;t walk through all the steps to do this, as Amazon makes it easy. Just <a target="_blank" href="http://aws.amazon.com/" target="_blank">sign up</a> for their S3 service (you only pay for what you use), sign in, find the Security Credentials page and take note of your <strong>Access Key ID</strong> and your <strong>Secret Access Key</strong>. You&#8217;ll need them later. You should also set up an S3 Bucket to store your backups. Write down the name of your bucket for use in a later step.</p>
<h2>Step 2: Download AutoMySQLBackup (optional)</h2>
<p>If you don&#8217;t have any MySQL databases to back up, or you have your own preferred method of backup in your databases, you can skip this step. AutoMySQLBackup is a free utility that quickly and easily create dumps of your MySQL data &#8211; which we&#8217;ll back up to Amazon S3 in a later step.</p>
<p>Download <a target="_blank" href="http://sourceforge.net/projects/automysqlbackup/" target="_blank">AutoMySQLBackup</a> from SourceForge and run the simple install.sh script to set it up. I followed <a target="_blank" href="http://www.ducea.com/2006/05/27/backup-your-mysql-databases-automatically-with-automysqlbackup/" target="_blank">this excellent blog post</a> to help me get AutoMySQLBackup configured and working. I had to make a few minor changes because I&#8217;m using a more current version of AutoMySQLBackup and some of the variable names in the config file were different, but it&#8217;s pretty straightforward. Once you&#8217;ve got it backing up your databases, you&#8217;re ready to move on.</p>
<h2>Step 3: Download and Install Duplicity</h2>
<p>Duplicity is the program that does most of the heavy lifting in this situation. It manages the actual file backup (full or incremental), compression, encryption, and the file transfer to any number of off-site storage locations. Lots of documentation is available online, in case your needs differ from the ones explained here. As always, Google is your friend. <img src='http://stevejenkins.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To install Duplicity if you&#8217;re running Fedora, RHEL, or CentOS, it&#8217;s as simple as doing:</p>
<pre>yum install duplicity</pre>
<p>For Ubuntu or Debian users, do:</p>
<pre>apt-get duplicity</pre>
<p>If you&#8217;re running some other flavor of Linux, refer to the <a target="_blank" href="http://duplicity.nongnu.org/" target="_blank">Duplicity website</a> for help installing.</p>
<h2>Step 4: Create a GPG Key for Backups</h2>
<p>Because you&#8217;re going to be transferring your precious data over the Internet, and storing it in an off-site location that shouldn&#8217;t be, but still technically <em>could</em> be, accessed by snooping Amazon employees or hackers, it&#8217;s best to encrypt your data before sending it&#8230; &#8220;<strong><em><a target="_blank" href="http://www.youtube.com/watch?v=-HRrbLA7rss" target="_blank">to the CLOUD!</a></em></strong>&#8221; Seriously, those commercials are so annoying.</p>
<p>Even if you already have a GPG key, I recommend creating a separate one just for backups (which we&#8217;ll also store in a secure location later so you&#8217;re never stuck without the ability to decrypt your data later). Do:</p>
<pre>gpg --gen-key</pre>
<p>You can accept all the defaults, but make sure you use a passphrase when creating this key, since Duplicity will require it. After you&#8217;ve answered all the questions, the output should look something like this:</p>
<pre>We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
.++++++++++++++++++++..+++++++++++++++++++++++++++++++++++++++++++++++++++++++.+++++
.+++++..+++++.+++++++++++++++++++++++++++++++++++++++++++++.....&gt;.++++++++++................................+++++
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
+++++.++++++++++..++++++++++...++++++++++...+++++.+++++..+++++.+++++..+++++++++++++++.+++
++++++++++++..+++++++++++++++..++++++++++..+++++++++++++++++++++++++...+++++..+++++&gt;+++
+++++++&gt;.+++++&gt;+++++......................+++++^^^
gpg: key 1F6C9247 marked as ultimately trusted
public and secret key created and signed.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
pub   2048R/1F6C9247 2011-11-05
      Key fingerprint = FC81 D8E3 8090 EEE3 1D98  E000 045C D80E 1F6C 9247
uid                  Backup Key &lt;backup@example.com&gt;
sub   2048R/12D6A5B0 2011-11-05</pre>
<p>Take note of your key&#8217;s public <strong>GPG Key ID</strong>, which is listed on the line where it says &#8220;key xxxxxxxx marked as ultimately trusted&#8221; (in this example, it&#8217;s <strong>1F6C9247). </strong>You can also find your GPG key&#8217;s public ID with:</p>
<pre>gpg --list-keys</pre>
<p>which will spit out something like:</p>
<pre>pub   2048R/1F6C9247 2011-11-05
uid                  Backup Key &lt;backup@example.com&gt;
sub   2048R/12D6A5B0 2011-11-05</pre>
<p>You&#8217;ll see your key&#8217;s ID on the top row after the slash. Write it down (don&#8217;t worry, it&#8217;s not a security risk like a password) to refer to in the next step.</p>
<h2>Step 5: Download and Configure dt-s3-backup Script</h2>
<p>While trying to make all the aforementioned tools work together, a stumped across a very cool script that already did it for me. <a target="_blank" href="http://blog.damontimm.com/bash-script-incremental-encrypted-backups-duplicity-amazon-s3/" target="_blank">This blog post</a> explains the script, and the script itself is <a target="_blank" href="https://github.com/thornomad/dt-s3-backup" target="_blank">hosted on GitHub</a>.</p>
<p>Download the script to your server (I put mine in <strong>/usr/local/bin</strong>) and then open it up in an editor. You&#8217;ll need to put the following in the appropriate locations inside the script:</p>
<ul>
<li>AWS_ACCESS_KEY_ID: Your Amazon Access Key (duh!)</li>
<li>AWS_SECRET_ACCESS_KEY: Your Amazon Secret Access Key (double duh!)</li>
<li>GPG_KEY: Your GPG Key ID of the key you created in the previous step</li>
<li>ROOT: I changed this to just &#8220;/&#8221; so that I could back up anything on the system. You&#8217;ll pick the exact directories you want in a bit.</li>
<li>DEST: Since we&#8217;re backing up to Amazon S3, comment out the &#8220;file:&#8221; line, uncomment the &#8220;s3+http:&#8221; line, and put the name of the Amazon S3 bucket you created for backups in the first step. If your bucket name were &#8220;my.awesome.backups&#8221; then this line would be <strong>DEST=&#8221;s3+http://my.awesome.backups/&#8221;</strong></li>
</ul>
<p>Skip the <strong>INCLIST</strong> and <strong>EXCLIST</strong> options for now, and tinker with the STATIC_OPTIONS to your liking. These will simply be passed to Duplicity, so you can check the Duplicity docs for all the possilibities. I have mine set to <strong>STATIC_OPTIONS=&#8221;&#8211;full-if-older-than 4W&#8221;</strong> which means my backup (which I run daily) will do incremental backups unless it&#8217;s been 4 weeks, in which case it will do a full backup. I also kept the default <strong>CLEAN_UP_TYPE</strong> and <strong>CLEAN_UP_VARIABLE</strong> settings. Again, refer to the Duplicity docs for other options.</p>
<p>Finally, I also tinkered with the Logfile settings and Email Alert settings.</p>
<h2>Step 6: Choose which directories to include and exclude</h2>
<p>Use the <strong>INCLIST</strong> and <strong>EXCLIST</strong> sections of the <strong>dt-s3-backup.sh</strong> script to list which directories you want to include and exclude while doing your backups. Examples are shown in the script. Make sure that whatever directory you used to store your database backups with AutoMySQLBackup is included. If you want hidden directories excluded, be sure to include them. The following are my lists:</p>
<pre>INCLIST=(  "/www/" \
           "/etc/" \
           "/home/" \
           "/root/" \
           "/usr/local/bin/" \
           "/usr/local/backups/db/" \
        )

 EXCLIST=(   "/www/logs" \
            "/etc/selinux" \
            "/home/*/Download/" \
            "/root/*/Download/" \
            "/home/*/.*/" \
            "/root/.*/" \
            "/home/*/logs" \
            "/home/*/Maildir" "/home/*/mail" "/root/Maildir" "/root/mail" \
        )</pre>
<p>These settings work for me, but there&#8217;s no guarantee they will work for you. It&#8217;s your data, so you should completely understand what is and isn&#8217;t going to be backed up.</p>
<h2>Step 7: Do a Test Run</h2>
<p>To test things out, find the following line in the dt-s3-backup.sh script and uncomment it (remove the #):</p>
<pre>#ECHO=$(which echo)</pre>
<p>As explained in the comments, this will run the script in test mode, which will spits out the full Duplicity command and send it to the email address you set up in the Email Alert settings.</p>
<p>Save your edited version of the script and run it with:</p>
<pre>dt-s3-backup.sh --backup</pre>
<p>Because it&#8217;s in test mode, it should think for a bit and then email you some output, which includes the full command that will be passed to Duplicity. If everything looks good, comment the <strong>#ECHO</strong> line out again, and go for it:</p>
<pre>dt-s3-backup.sh --backup</pre>
<p>Depending on many factors (the amount of data you&#8217;re backing up, the speed of your system, the speed of your connection to Amazon S3, the phase of the moon), you&#8217;ll have to wait for a bit. My system takes about 5 minutes to run a full backup.</p>
<p>If something goes wrong, check all your edits, and check the links to the other blog posts I&#8217;ve included. I won&#8217;t be any help answering support questions in this thread, because I&#8217;m not the author of any of these applications. <img src='http://stevejenkins.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Step 8: Check Your Files</h2>
<p>Assuming your backup worked, you can ask Duplicity to list all the files in your backup with:</p>
<pre>dt-s3-backup.sh --list-current-files | more</pre>
<p>Keep in mind that these will count as a requests against your Amazon S3 allowance. You get a bunch of free ones, but managing your Amazon bill is completely your responsibility.</p>
<p>Other options for <strong>dt-s3-backup.sh</strong> are available in its <strong>README</strong> file. I recommend experimenting with them until you&#8217;re familiar with the ones you&#8217;ll need.</p>
<h2>Step 9: Automate</h2>
<p>Once everything is working as you want it, don&#8217;t forget to create cron jobs for AutoMySQLBackup and dt-s3-backup.sh, I dump my databases nightly, and I do an incremental backup with dt-s3-backup weekly. Use whatever settings work best for you.</p>
<h2>Step 10: Provide Feedback</h2>
<p>I always welcome your feedback, especially if you have suggestions for making the process in this article easier to do or understand. If you have a different backup method that works for you, please feel free to share it. Because I&#8217;m not the author of any of these utilities, however, I can&#8217;t provide support in using them. Check the links I&#8217;ve provided for support, or contact the application authors directly if you&#8217;re having trouble.</p>
<p>Good luck moving your data from &#8220;waiting to be lost&#8221; to &#8220;backed up.&#8221; I know I sleep better knowing I&#8217;m better prepared to deal with disaster!</p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/02/how-to-set-up-ushare-media-server-on-fedora-centos-to-stream-video-and-pictures-to-xbox-360-or-ps3/' rel='bookmark' title='How to set up uShare media server on Fedora / CentOS to stream video and pictures to Xbox 360 or PS3'>How to set up uShare media server on Fedora / CentOS to stream video and pictures to Xbox 360 or PS3</a></li>
<li><a href='http://stevejenkins.com/blog/2012/02/how-to-reboot-with-a-bash-inputoutput-error/' rel='bookmark' title='How to Reboot with a Bash Input/Output Error'>How to Reboot with a Bash Input/Output Error</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/installing-opendkim-rpm-via-yum-with-postfix-or-sendmail-for-rhel-centos-fedora/' rel='bookmark' title='Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)'>Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Field Strip a Remington Wingmaster 870 Shotgun</title>
		<link>http://stevejenkins.com/blog/2011/10/how-to-field-strip-a-remington-wingmaster-870-shotgun/</link>
		<comments>http://stevejenkins.com/blog/2011/10/how-to-field-strip-a-remington-wingmaster-870-shotgun/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 00:14:39 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[870]]></category>
		<category><![CDATA[assemble]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[disassemble]]></category>
		<category><![CDATA[field strip]]></category>
		<category><![CDATA[Remington]]></category>
		<category><![CDATA[Remington 870]]></category>
		<category><![CDATA[shotgun]]></category>
		<category><![CDATA[take apart]]></category>
		<category><![CDATA[takedown]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[Wingmaster]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1746</guid>
		<description><![CDATA[The Remington Wingmaster 870 is the quintessential American shotgun. There are many other renowned shotgun makers out there, and many other shotguns that have hosts of fancy features, but like an old-timer I met at a shooting range one time told me: &#8220;Some guns just feel right like an old pair of shoes.&#8221; For me, that&#8217;s [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>The Remington Wingmaster 870 is <em>the</em> quintessential American shotgun. There are many other renowned shotgun makers out there, and many other shotguns that have hosts of fancy features, but like an old-timer I met at a shooting range one time told me: &#8220;Some guns just feel right like an old pair of shoes.&#8221; For me, that&#8217;s the Remington 870.</p>
<p>Here&#8217;s my favorite YouTube video on how to field strip one:</p>
<p><object width="620" height="465"><param name="movie" value="http://www.youtube.com/v/hkPJHzw4PXg?version=3&#038;feature=oembed"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hkPJHzw4PXg?version=3&#038;feature=oembed" type="application/x-shockwave-flash" width="620" height="465" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2011/10/how-to-field-strip-a-remington-wingmaster-870-shotgun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Use a Free StartSSL Certificate in Postfix for SSL/TLS</title>
		<link>http://stevejenkins.com/blog/2011/09/how-to-use-a-free-startssl-certificate-in-postfix-for-ssltls/</link>
		<comments>http://stevejenkins.com/blog/2011/09/how-to-use-a-free-startssl-certificate-in-postfix-for-ssltls/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 02:59:35 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[csr]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[key]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[self-signed]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[StartSSL]]></category>
		<category><![CDATA[TLS]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1712</guid>
		<description><![CDATA[Most of us use self-signed SSL certificates when setting up secure SMTP connections on our servers. And why not? It&#8217;s free! You do have to put up with your mail client &#8220;warning&#8221; you that the identity of the remote server can&#8217;t be verified, but that&#8217;s worth the minor inconvenience for the price. But&#8230; what if [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/06/fixing-postfix-certificate-verification-failed-for-gmail-untrusted-issuer-error-message/' rel='bookmark' title='Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message'>Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message</a></li>
<li><a href='http://stevejenkins.com/blog/2010/08/renewing-a-self-signed-ssl-certificate-on-fedoracentos/' rel='bookmark' title='Renewing a Self-Signed SSL Certificate on Fedora/CentOS'>Renewing a Self-Signed SSL Certificate on Fedora/CentOS</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/how-to-get-dkim-and-domainkeys-working-with-postfix-on-rhel-5-centos-5-using-opendkim-and-dk-milter/' rel='bookmark' title='How to get DKIM and DomainKeys working with Postfix on RHEL 5 / CentOS 5 using OpenDKIM and dk-milter'>How to get DKIM and DomainKeys working with Postfix on RHEL 5 / CentOS 5 using OpenDKIM and dk-milter</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Most of us use self-signed SSL certificates when setting up secure SMTP connections on our servers. And why not? It&#8217;s free! You do have to put up with your mail client &#8220;warning&#8221; you that the identity of the remote server can&#8217;t be verified, but that&#8217;s worth the minor inconvenience for the price. But&#8230; what if you could use an <em>actual</em> SSL certificate on your server, <em>and</em> get rid of those warnings, and still do it for <em>free</em>?</p>
<p>You can &#8211; thanks to <a target="_blank" href="https://www.startssl.com/" target="_blank">StartSSL</a> - the self-proclaimed &#8220;Swiss Army Knife of Digital Certificates &amp; PKI.&#8221;</p>
<p>While the interface may not be as slick as other SSL providers (like GoDaddy or Network Solutions), what StartSSL lacks in design they make up for in value. You can actually get a 128/256-bit Encrypted Class 1 SSL/TLS + S.MIME certificate <strong>for free</strong>. Seriously, no strings attached.</p>
<h2>Step 1: Sign up and Get Verified</h2>
<p>The first step is to sign up at <a target="_blank" href="http://startssl.com/" target="_blank">StartSSL</a> and verify your personal identity via email, and also verify that you have admin authority for the domain. I noticed that Chrome won&#8217;t work properly with their authentication procedure, so you&#8217;ll need to use IE, Firefox, or Safari. I won&#8217;t go through all the verification steps here. Just follow the instructions on their website to get verified, and get to the Control Panel. Or, try their Express Lane option to get verified and receive a certificate in one step.</p>
<p><strong>IMPORTANT</strong>: Make sure you choose the proper domain and subdomain name for your certificate when you come to that point. You can change your mind later, but you&#8217;ll have to pay $25 to do so. Just be sure you understand everything before you start clicking buttons&#8230;</p>
<p>Eventually, you&#8217;ll reach the Certificates Wizard. Select a <strong>Web Server SSL/TLS Certificate</strong>. Then press the <strong>Skip&gt;&gt;</strong> button, because you&#8217;ll want to create your own private key and certificate request on your server.</p>
<h2>Step 2: Create Your Key and CSR</h2>
<p>The next screen is where you submit your certificate request (<strong>CSR</strong>). But first, you&#8217;ll need to build your private key and the CSR itself. Make a directory to store all your SSL files with</p>
<pre>mkdir -p /etc/ssl
cd /etc/ssl</pre>
<p>Of course, you can choose any directory to store your SSL stuff, and you may already even have one. Use whatever directory you like. I personally like <strong>/etc/ssl</strong> because it&#8217;s easy to remember.</p>
<p>Inside your <strong>/etc/ssl</strong> directory, do:</p>
<pre>openssl req -new -newkey rsa:2048 -nodes -keyout hostname.domain.key -out hostname.domain.csr</pre>
<p>You can use any filename you want for the key and csr, but I like to include the subdomain and hostname of the mail server in mine, such as <strong>mail.example.key</strong> and <strong>mail.example.csr</strong>.</p>
<p>This command build both your private key and the CSR. Answer the questions (you don&#8217;t have to answer the optional ones), and be sure that when it requests the <strong>Common Name</strong>, use hostname and domain name of your server as you&#8217;ll be entering it in your email client (such as <strong>mail.example.com</strong>). If you make a mistake anywhere along the way, you can CTRL+C out of it, or just re-run the command to write a new key and CSR over the existing ones.</p>
<p>Once the command is finished, do an <strong>ls</strong> to see the two files you just created.</p>
<p>Your private key must be kept, well, <em>private</em>. So get into the habit of setting proper permissions for private keys right after you make them.</p>
<pre>chmod 0640 hostname.domain.key</pre>
<h2>Step 3: Give your CSR to StartSSL and receive your certificate</h2>
<p>Spit out the contents of your CSR with:</p>
<pre>cat hostname.domain.csr</pre>
<p>Then copy the entire contents of the file (including the:</p>
<pre>-----BEGIN CERTIFICATE REQUEST-----</pre>
<p>and</p>
<pre>-----END CERTIFICATE REQUEST-----</pre>
<p>lines, then paste it into the text area of the StartSSL CSR request page.</p>
<p>Hit the <strong>Continue&gt;&gt;</strong> button, and then select the specific subomain and domain you&#8217;ll use (such as mail.example.com or www.example.com) to access your server. For the free Class 1 certificate, you can include the domain and only <em>one</em> subdomain. This means the certificate will work for example.com and www.example.com, or example.com and mail.example.com.</p>
<p>If you want your certificate to work for <em>two</em> or more subdomains in addition to the primary domain, you&#8217;ll need to pay $59.99 to become Class 2 verified. But the good news is that you can then generate unlimited Class 2 certificates, which allow multiple and/or wildcard subdomains on your certificates. This is actually what I did, and it&#8217;s still a bargain.</p>
<p>After your request is processed,  the certificate back from StartSSL, copy the contents and paste them into a file in your <strong>/etc/ssl</strong> directory called <strong>hostname.domain.crt</strong> (using your hostname and domain name, of course).</p>
<p>At this point, it&#8217;s a good idea to download all three files (key, csr, and crt) and store them somewhere safe. I have a secure USB key that I keep for such a purpose. Your <strong>.key</strong> file is irreplaceable at this point. If you lose it or accidentally delete it, you&#8217;ll have to revoke your certificate, which will cost you $25.</p>
<h2>Step 4: Download the StartSSL Bundle</h2>
<p>Certificates are about trust, and so you&#8217;ll need to inform your server that you trust StartSSL. List of certificate authorities that your server can trust are stored in Certificate Bundles. Download StartSSL&#8217;s bundle with:</p>
<pre>wget --no-check-certificate https://www.startssl.com/certs/ca-bundle.pem -O startssl-ca-bundle.pem</pre>
<p>If you have a pre-existing certificate bundle file somewhere on your server (such as ca-bundle.crt or cacert.pem), you may want to copy it into your <strong>/etc/ssl</strong> directory:</p>
<pre>cp /etc/pki/tls/certs/ca-bundle.crt /etc/ssl</pre>
<p>Then you&#8217;ll need to combine the StartSSL ca-bundle with your existing bundle (this step just copies the StartSSL bundle to the new filename if you didn&#8217;t have an existing bundle):</p>
<pre>cat startssl-ca-bundle.pem &gt;&gt; ca-bundle.crt</pre>
<p>Now edit your Postfix <strong>main.cf</strong> file and put in the updated locations of your private key, certificate, and bundle:</p>
<pre>smtpd_tls_key_file = /etc/ssl/mail.scuderia.key
smtpd_tls_cert_file = /etc/ssl/mail.scuderia.crt
smtpd_tls_CAfile = /etc/ssl/ca-bundle.crt
smtp_tls_CAfile = $smtpd_tls_CAfile</pre>
<p>This article assumes that you&#8217;ve probably already got Postfix set up for SSL/TLS with a self-signed certificate, so all the <strong>main.cf</strong> settings in addition to the ones I&#8217;ve mentioned above for TLS should already be in place. This article won&#8217;t explain how to do that (but there are plenty of great articles out there to get that working). I will, however, show you what the SMTP TLS section of my <strong>main.cf</strong> file looks like, in case it&#8217;s any help:</p>
<pre>
# SMTP TLS
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/mail.domain.key
smtpd_tls_cert_file = /etc/ssl/mail.domain.crt
smtpd_tls_CAfile = /etc/ssl/cacert.pem
smtp_tls_CAfile = $smtpd_tls_CAfile
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
</pre>
<p>Once you&#8217;ve got your settings right, restart Postfix with:</p>
<pre>service postfix restart</pre>
<p>Now you&#8217;re connecting to your outgoing mail server with a third-party signed certificate!</p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/06/fixing-postfix-certificate-verification-failed-for-gmail-untrusted-issuer-error-message/' rel='bookmark' title='Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message'>Fixing Postfix &#8220;certificate verification failed for gmail untrusted issuer&#8221; Error Message</a></li>
<li><a href='http://stevejenkins.com/blog/2010/08/renewing-a-self-signed-ssl-certificate-on-fedoracentos/' rel='bookmark' title='Renewing a Self-Signed SSL Certificate on Fedora/CentOS'>Renewing a Self-Signed SSL Certificate on Fedora/CentOS</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/how-to-get-dkim-and-domainkeys-working-with-postfix-on-rhel-5-centos-5-using-opendkim-and-dk-milter/' rel='bookmark' title='How to get DKIM and DomainKeys working with Postfix on RHEL 5 / CentOS 5 using OpenDKIM and dk-milter'>How to get DKIM and DomainKeys working with Postfix on RHEL 5 / CentOS 5 using OpenDKIM and dk-milter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2011/09/how-to-use-a-free-startssl-certificate-in-postfix-for-ssltls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Git Commands I Like</title>
		<link>http://stevejenkins.com/blog/2011/09/git-commands-i-like/</link>
		<comments>http://stevejenkins.com/blog/2011/09/git-commands-i-like/#comments</comments>
		<pubDate>Wed, 21 Sep 2011 00:44:38 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[develop]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[git commands]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[push]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1699</guid>
		<description><![CDATA[This is going to be one of those posts that is probably useless to everyone else, but valuable enough to me that I&#8217;ll read it over and over. These are the Git commands I use most when working with projects on my GitHub, and with Git repos to which I have read-only access. (Big thanks to Murray K. [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2010/09/my-favorite-imagemagick-commands/' rel='bookmark' title='My Favorite ImageMagick Commands'>My Favorite ImageMagick Commands</a></li>
<li><a href='http://stevejenkins.com/blog/2010/10/no-controllers-found-fix-set-up-dell-omsa-6-3-32-bit-on-rhel-centos-5-5-64-bit/' rel='bookmark' title='&#8220;No controllers found&#8221; fix: set up Dell OMSA 6.3 32-bit on RHEL / CentOS 5.5 64-bit'>&#8220;No controllers found&#8221; fix: set up Dell OMSA 6.3 32-bit on RHEL / CentOS 5.5 64-bit</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/no-controllers-found-fix-set-up-dell-omsa-6-4-32-bit-on-rhel-centos-5-5-64-bit/' rel='bookmark' title='“No controllers found” fix: set up Dell OMSA 6.4 32-bit on RHEL / CentOS 5.5 64-bit'>“No controllers found” fix: set up Dell OMSA 6.4 32-bit on RHEL / CentOS 5.5 64-bit</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is going to be one of those posts that is probably useless to everyone else, but valuable enough to me that I&#8217;ll read it over and over. These are the Git commands I use most when working with projects on my <a target="_blank" href="https://github.com/stevejenkins" target="_blank">GitHub</a>, and with Git repos to which I have read-only access.</p>
<p>(Big thanks to Murray K. and Todd L. for hand-holding me through this <img src='http://stevejenkins.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>For my projects, I use a watered down version of the branching model presented in <a target="_blank" href="http://nvie.com/posts/a-successful-git-branching-model/" target="_blank">this article</a>, so that I always have two branches:</p>
<ul>
<li><strong>Master</strong>: which always represents a release version of a project</li>
<li><strong>Develop</strong>: which represents the progress I&#8217;m making toward the next release version</li>
</ul>
<p>Therefore, for reasons that <em>should</em> be obvious, I always request that collaborators make pull requests only on the <strong>Develop</strong> branch.</p>
<h2>Making changes to Develop</h2>
<p>To check out my Develop branch, I do:</p>
<pre>git checkout develop</pre>
<p>I make whatever changes I want, and then make sure the files I want to include in commits are added with:</p>
<pre>git add &lt;filename&gt;</pre>
<p>(I only need to do this once per file.)</p>
<p>When I&#8217;m ready to commit at least one changed file, I do:</p>
<pre>git commit -a</pre>
<p>and then add notes about the changes I made.</p>
<p>Then I do:</p>
<pre>git push</pre>
<p>to push my local version of the <strong>Develop</strong> repo to GitHub.</p>
<h2>Merging Develop into Master</h2>
<p>Technically, with the branching model I&#8217;m using, I should <em>never</em> commit changes directly to Master. All updates should be put into Develop, and then once Develop represents a version that I think is ready to be released, and all the changes I want are committed to Develop and pushed, I merge Develop into Master with:</p>
<pre>git checkout master
git merge develop
git push</pre>
<h2>Checkout Out Someone Else&#8217;s Repo and Submitting A Diff</h2>
<p>When checking out someone else&#8217;s repo and submitting a diff to them, I do the following:</p>
<p>Do a git checkout of their develop branch with (usually):</p>
<pre>git checkout develop
git pull</pre>
<p>Then I create my own temporary branch from that with:</p>
<pre>git checkout -b develop_branchname</pre>
<p>Next, I edit or copy my changes into the branch and commit them with:</p>
<pre>git commit -a</pre>
<p>If I don&#8217;t have write/push access to the repo, I need to create a patch to send to the author with:</p>
<pre>git format-patch develop..develop_branchname</pre>
<p>After sending the diff, I can delete my temporary branch with:</p>
<pre>git checkout develop
git branch -D develop_branchname</pre>
<h2>Further Reading</h2>
<ul>
<li><a target="_blank" href="http://help.github.com/git-cheat-sheets/" target="_blank">GitHub Cheat Sheet</a></li>
</ul>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2010/09/my-favorite-imagemagick-commands/' rel='bookmark' title='My Favorite ImageMagick Commands'>My Favorite ImageMagick Commands</a></li>
<li><a href='http://stevejenkins.com/blog/2010/10/no-controllers-found-fix-set-up-dell-omsa-6-3-32-bit-on-rhel-centos-5-5-64-bit/' rel='bookmark' title='&#8220;No controllers found&#8221; fix: set up Dell OMSA 6.3 32-bit on RHEL / CentOS 5.5 64-bit'>&#8220;No controllers found&#8221; fix: set up Dell OMSA 6.3 32-bit on RHEL / CentOS 5.5 64-bit</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/no-controllers-found-fix-set-up-dell-omsa-6-4-32-bit-on-rhel-centos-5-5-64-bit/' rel='bookmark' title='“No controllers found” fix: set up Dell OMSA 6.4 32-bit on RHEL / CentOS 5.5 64-bit'>“No controllers found” fix: set up Dell OMSA 6.4 32-bit on RHEL / CentOS 5.5 64-bit</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2011/09/git-commands-i-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple CloudFront Invalidation of a Single File via HTTP</title>
		<link>http://stevejenkins.com/blog/2011/09/simple-cloudfront-invalidation-of-a-single-file-via-http/</link>
		<comments>http://stevejenkins.com/blog/2011/09/simple-cloudfront-invalidation-of-a-single-file-via-http/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 06:05:38 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[CloudFront]]></category>
		<category><![CDATA[distribution]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[invalidate]]></category>
		<category><![CDATA[invalidation]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[single file]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1642</guid>
		<description><![CDATA[I found a great post by Clay Loveless who wrote a PHP script to batch invalidate files files on an Amazon Web Services CloudFront distribution. You rock, Clay. Amazon doesn&#8217;t even let us do that (yet?) via the AWS Mangament Console. Until now, when I wanted to manually invalidate a single file, I had to [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/' rel='bookmark' title='How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup'>How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup</a></li>
<li><a href='http://stevejenkins.com/blog/2010/08/renewing-a-self-signed-ssl-certificate-on-fedoracentos/' rel='bookmark' title='Renewing a Self-Signed SSL Certificate on Fedora/CentOS'>Renewing a Self-Signed SSL Certificate on Fedora/CentOS</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/' rel='bookmark' title='How to Install APC (Alternative PHP Cache) on CentOS 5.6'>How to Install APC (Alternative PHP Cache) on CentOS 5.6</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://stevejenkins.com/blog/wp-content/uploads/2011/09/cloudfrontlogo.jpg"><img class="alignleft size-full wp-image-1648" title="Amazon Web Services CloudFront" src="http://stevejenkins.com/blog/wp-content/uploads/2011/09/cloudfrontlogo.jpg" alt="Amazon Web Services CloudFront" width="200" height="156" /></a>I found a <a href="http://claylo.com/post/6217485965/aws-cloudfront-invalidation-quickie" target="_blank">great post by Clay Loveless</a> who wrote a PHP script to batch invalidate files files on an Amazon Web Services CloudFront distribution. You rock, Clay. Amazon doesn&#8217;t even let us do that (yet?) via the AWS Mangament Console.</p>
<p>Until now, when I wanted to manually invalidate a single file, I had to fire up <a target="_blank" href="http://www.cloudberrylab.com/" target="_blank">CloudBerry S3 Explorer</a> and scroll through thousands of files to get to the one I wanted to invalidate. For automated on-the-fly batch sync and CloudFront invalidation, I still rely on the excellent <a target="_blank" href="http://s3tools.org/s3cmd" target="_blank">s3cmd</a> command-line tool.</p>
<p>I&#8217;m not a developer, but I can lightly hack my way around PHP code &#8211; especially when it&#8217;s as clean as Clay&#8217;s.  I took his excellent script one small step farther to allow invalidating a single file via HTTP (using your browser) by including the to-be-invalidated filename in a URL, with the ability to optionally pass the CloudFront Distribution ID via a separate variable in the URL (handy for those of us managing multiple distributions). I <em>highly</em> recommend making sure you place this file in a password protected area of your website.</p>
<p>So here&#8217;s my modified version of Clay&#8217;s PHP script providing a simple way to invalidate a single file on CloudFront using your browser:</p>
<div id="gist-1199777" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="cp">&lt;?php</span></div><div class='line' id='LC2'><span class="sd">/**</span></div><div class='line' id='LC3'><span class="sd"> * Super-simple AWS CloudFront Invalidation Script</span></div><div class='line' id='LC4'><span class="sd"> * Modified by Steve Jenkins &lt;steve stevejenkins com&gt; to invalidate a single file via URL.</span></div><div class='line' id='LC5'><span class="sd"> * </span></div><div class='line' id='LC6'><span class="sd"> * Steps:</span></div><div class='line' id='LC7'><span class="sd"> * 1. Set your AWS Access Key</span></div><div class='line' id='LC8'><span class="sd"> * 2. Set your AWS Secret Key</span></div><div class='line' id='LC9'><span class="sd"> * 3. Set your CloudFront Distribution ID (or pass one via the URL with &amp;dist)</span></div><div class='line' id='LC10'><span class="sd"> * 4. Put cf-invalidate.php in a web accessible and password protected directory</span></div><div class='line' id='LC11'><span class="sd"> * 5. Run it via: http://example.com/protected_dir/cf-invalidate.php?filename=FILENAME</span></div><div class='line' id='LC12'><span class="sd"> *    or http://example.com/cf-invalidate.php?filename=FILENAME&amp;dist=DISTRIBUTION_ID</span></div><div class='line' id='LC13'><span class="sd"> * </span></div><div class='line' id='LC14'><span class="sd"> * The author disclaims copyright to this source code.</span></div><div class='line' id='LC15'><span class="sd"> *</span></div><div class='line' id='LC16'><span class="sd"> * Details on what&#39;s happening here are in the CloudFront docs:</span></div><div class='line' id='LC17'><span class="sd"> * http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html</span></div><div class='line' id='LC18'><span class="sd"> * </span></div><div class='line' id='LC19'><span class="sd"> */</span></div><div class='line' id='LC20'><br/></div><div class='line' id='LC21'><span class="nv">$onefile</span> <span class="o">=</span> <span class="nv">$_GET</span><span class="p">[</span><span class="s1">&#39;filename&#39;</span><span class="p">];</span> <span class="c1">// You must include ?filename=FILENAME in your URL or this won&#39;t work</span></div><div class='line' id='LC22'><br/></div><div class='line' id='LC23'><span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nb">isset</span><span class="p">(</span><span class="nv">$_GET</span><span class="p">[</span><span class="s1">&#39;dist&#39;</span><span class="p">]))</span> <span class="p">{</span></div><div class='line' id='LC24'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$distribution</span> <span class="o">=</span> <span class="s1">&#39;DISTRIBUTION_ID&#39;</span><span class="p">;</span> <span class="c1">// Your CloudFront Distribution ID, or pass one via &amp;dist=</span></div><div class='line' id='LC25'><span class="p">}</span> <span class="k">else</span> <span class="p">{</span></div><div class='line' id='LC26'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$distribution</span> <span class="o">=</span> <span class="nv">$_GET</span><span class="p">[</span><span class="s1">&#39;dist&#39;</span><span class="p">];</span></div><div class='line' id='LC27'><span class="p">}</span></div><div class='line' id='LC28'><br/></div><div class='line' id='LC29'><span class="nv">$access_key</span> <span class="o">=</span> <span class="s1">&#39;AWS_ACCESS_KEY&#39;</span><span class="p">;</span> <span class="c1">// Your AWS Access Key goes here</span></div><div class='line' id='LC30'><span class="nv">$secret_key</span> <span class="o">=</span> <span class="s1">&#39;AWS_SECRET_KEY&#39;</span><span class="p">;</span> <span class="c1">// Your AWS Secret Key goes here</span></div><div class='line' id='LC31'><span class="nv">$epoch</span> <span class="o">=</span> <span class="nb">date</span><span class="p">(</span><span class="s1">&#39;U&#39;</span><span class="p">);</span></div><div class='line' id='LC32'><br/></div><div class='line' id='LC33'><span class="nv">$xml</span> <span class="o">=</span> <span class="s">&lt;&lt;&lt;EOD</span></div><div class='line' id='LC34'><span class="s">&lt;InvalidationBatch&gt;</span></div><div class='line' id='LC35'><span class="s">    &lt;Path&gt;{$onefile}&lt;/Path&gt;</span></div><div class='line' id='LC36'><span class="s">    &lt;CallerReference&gt;{$distribution}{$epoch}&lt;/CallerReference&gt;</span></div><div class='line' id='LC37'><span class="s">&lt;/InvalidationBatch&gt;</span></div><div class='line' id='LC38'><span class="s">EOD;</span></div><div class='line' id='LC39'><br/></div><div class='line' id='LC40'><br/></div><div class='line' id='LC41'><span class="sd">/**</span></div><div class='line' id='LC42'><span class="sd"> * You probably don&#39;t need to change anything below here.</span></div><div class='line' id='LC43'><span class="sd"> */</span></div><div class='line' id='LC44'><span class="nv">$len</span> <span class="o">=</span> <span class="nb">strlen</span><span class="p">(</span><span class="nv">$xml</span><span class="p">);</span></div><div class='line' id='LC45'><span class="nv">$date</span> <span class="o">=</span> <span class="nb">gmdate</span><span class="p">(</span><span class="s1">&#39;D, d M Y G:i:s T&#39;</span><span class="p">);</span></div><div class='line' id='LC46'><span class="nv">$sig</span> <span class="o">=</span> <span class="nb">base64_encode</span><span class="p">(</span></div><div class='line' id='LC47'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nb">hash_hmac</span><span class="p">(</span><span class="s1">&#39;sha1&#39;</span><span class="p">,</span> <span class="nv">$date</span><span class="p">,</span> <span class="nv">$secret_key</span><span class="p">,</span> <span class="k">true</span><span class="p">)</span></div><div class='line' id='LC48'><span class="p">);</span></div><div class='line' id='LC49'><br/></div><div class='line' id='LC50'><span class="nv">$msg</span> <span class="o">=</span> <span class="s2">&quot;POST /2010-11-01/distribution/</span><span class="si">{</span><span class="nv">$distribution</span><span class="si">}</span><span class="s2">/invalidation HTTP/1.0</span><span class="se">\r\n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC51'><span class="nv">$msg</span> <span class="o">.=</span> <span class="s2">&quot;Host: cloudfront.amazonaws.com</span><span class="se">\r\n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC52'><span class="nv">$msg</span> <span class="o">.=</span> <span class="s2">&quot;Date: </span><span class="si">{</span><span class="nv">$date</span><span class="si">}</span><span class="se">\r\n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC53'><span class="nv">$msg</span> <span class="o">.=</span> <span class="s2">&quot;Content-Type: text/xml; charset=UTF-8</span><span class="se">\r\n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC54'><span class="nv">$msg</span> <span class="o">.=</span> <span class="s2">&quot;Authorization: AWS </span><span class="si">{</span><span class="nv">$access_key</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="nv">$sig</span><span class="si">}</span><span class="se">\r\n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC55'><span class="nv">$msg</span> <span class="o">.=</span> <span class="s2">&quot;Content-Length: </span><span class="si">{</span><span class="nv">$len</span><span class="si">}</span><span class="se">\r\n\r\n</span><span class="s2">&quot;</span><span class="p">;</span></div><div class='line' id='LC56'><span class="nv">$msg</span> <span class="o">.=</span> <span class="nv">$xml</span><span class="p">;</span></div><div class='line' id='LC57'><br/></div><div class='line' id='LC58'><span class="nv">$fp</span> <span class="o">=</span> <span class="nb">fsockopen</span><span class="p">(</span><span class="s1">&#39;ssl://cloudfront.amazonaws.com&#39;</span><span class="p">,</span> <span class="mi">443</span><span class="p">,</span> </div><div class='line' id='LC59'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$errno</span><span class="p">,</span> <span class="nv">$errstr</span><span class="p">,</span> <span class="mi">30</span></div><div class='line' id='LC60'><span class="p">);</span></div><div class='line' id='LC61'><span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nv">$fp</span><span class="p">)</span> <span class="p">{</span></div><div class='line' id='LC62'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">die</span><span class="p">(</span><span class="s2">&quot;Connection failed: </span><span class="si">{</span><span class="nv">$errno</span><span class="si">}</span><span class="s2"> </span><span class="si">{</span><span class="nv">$errstr</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">);</span></div><div class='line' id='LC63'><span class="p">}</span></div><div class='line' id='LC64'><span class="nb">fwrite</span><span class="p">(</span><span class="nv">$fp</span><span class="p">,</span> <span class="nv">$msg</span><span class="p">);</span></div><div class='line' id='LC65'><span class="nv">$resp</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="p">;</span></div><div class='line' id='LC66'><span class="k">while</span><span class="p">(</span><span class="o">!</span> <span class="nb">feof</span><span class="p">(</span><span class="nv">$fp</span><span class="p">))</span> <span class="p">{</span></div><div class='line' id='LC67'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nv">$resp</span> <span class="o">.=</span> <span class="nb">fgets</span><span class="p">(</span><span class="nv">$fp</span><span class="p">,</span> <span class="mi">1024</span><span class="p">);</span></div><div class='line' id='LC68'><span class="p">}</span></div><div class='line' id='LC69'><span class="nb">fclose</span><span class="p">(</span><span class="nv">$fp</span><span class="p">);</span></div><div class='line' id='LC70'><span class="k">print</span> <span class="s1">&#39;&lt;pre&gt;&#39;</span><span class="o">.</span><span class="nv">$resp</span><span class="o">.</span><span class="s1">&#39;&lt;/pre&gt;&#39;</span><span class="p">;</span> <span class="c1">// Make the output more readable in your browser</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1199777/7c9b9f1cf5d62f3dc0e3c21345a27e2615d68232/cf-invalidate.php" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1199777#file_cf_invalidate.php" style="float:right;margin-right:10px;color:#666">cf-invalidate.php</a>
            <a href="https://gist.github.com/1199777">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>

<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2011/11/how-to-back-up-a-linux-server-to-amazon-s3-with-duplicity-and-automysqlbackup/' rel='bookmark' title='How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup'>How to Back Up a Linux Server to Amazon S3 with Duplicity and AutoMySQLBackup</a></li>
<li><a href='http://stevejenkins.com/blog/2010/08/renewing-a-self-signed-ssl-certificate-on-fedoracentos/' rel='bookmark' title='Renewing a Self-Signed SSL Certificate on Fedora/CentOS'>Renewing a Self-Signed SSL Certificate on Fedora/CentOS</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/' rel='bookmark' title='How to Install APC (Alternative PHP Cache) on CentOS 5.6'>How to Install APC (Alternative PHP Cache) on CentOS 5.6</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2011/09/simple-cloudfront-invalidation-of-a-single-file-via-http/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SSH slow to connect? Turn UseDNS off</title>
		<link>http://stevejenkins.com/blog/2011/09/ssh-slow-to-connect-turn-usedns-off/</link>
		<comments>http://stevejenkins.com/blog/2011/09/ssh-slow-to-connect-turn-usedns-off/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 18:16:27 +0000</pubDate>
		<dc:creator>Steve Jenkins</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[slow connect]]></category>
		<category><![CDATA[slow SSH]]></category>
		<category><![CDATA[sshd_config]]></category>
		<category><![CDATA[UseDNS]]></category>

		<guid isPermaLink="false">http://stevejenkins.com/blog/?p=1639</guid>
		<description><![CDATA[Another quick tidbit I learned when one of my CentOS boxes was slow to connect via SSH. Connection happened quickly when I would connect from a box on the same router, but connecting from my home machine caused a delay of 20-30 seconds each time. The fix was uncommenting this line in /etc/ssh/sshd_config: #UseDNS yes [...]
Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2010/08/set-up-vnc-on-rhel-5-5-centos-5-5/' rel='bookmark' title='Set up VNC on RHEL 5.5 / CentOS 5.5'>Set up VNC on RHEL 5.5 / CentOS 5.5</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/installing-opendkim-rpm-via-yum-with-postfix-or-sendmail-for-rhel-centos-fedora/' rel='bookmark' title='Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)'>Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/building-postfix-2-8-on-rhel5-centos-5-from-source/' rel='bookmark' title='Building Postfix 2.8 on RHEL5 / CentOS 5 from Source'>Building Postfix 2.8 on RHEL5 / CentOS 5 from Source</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Another quick tidbit I learned when one of my CentOS boxes was slow to connect via SSH. Connection happened quickly when I would connect from a box on the same router, but connecting from my home machine caused a delay of 20-30 seconds each time. The fix was uncommenting this line in <strong>/etc/ssh/sshd_config</strong>:</p>
<pre>#UseDNS yes</pre>
<p>and changing it to:</p>
<pre>UseDNS no</pre>
<p>I believe the delays were being caused by a combination of IPv6 and DNS, but regardless of the cause, that was the fix.</p>
<p>Related posts:<ol>
<li><a href='http://stevejenkins.com/blog/2010/08/set-up-vnc-on-rhel-5-5-centos-5-5/' rel='bookmark' title='Set up VNC on RHEL 5.5 / CentOS 5.5'>Set up VNC on RHEL 5.5 / CentOS 5.5</a></li>
<li><a href='http://stevejenkins.com/blog/2011/08/installing-opendkim-rpm-via-yum-with-postfix-or-sendmail-for-rhel-centos-fedora/' rel='bookmark' title='Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)'>Installing OpenDKIM RPM via Yum with Postfix or Sendmail (for RHEL / CentOS / Fedora)</a></li>
<li><a href='http://stevejenkins.com/blog/2011/01/building-postfix-2-8-on-rhel5-centos-5-from-source/' rel='bookmark' title='Building Postfix 2.8 on RHEL5 / CentOS 5 from Source'>Building Postfix 2.8 on RHEL5 / CentOS 5 from Source</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://stevejenkins.com/blog/2011/09/ssh-slow-to-connect-turn-usedns-off/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 2/125 queries in 0.059 seconds using apc
Object Caching 3061/3261 objects using apc

Served from: stevejenkins.com @ 2012-05-17 21:14:20 -->
