<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>WordPress — Jürgen Kreileder</title>
	<atom:link href="/articles/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Software Engineer and Consultant</description>
	<lastBuildDate>Sat, 29 Oct 2016 01:51:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">5303222</site><image><title>Jürgen Kreileder</title><url>/jk-rss.jpg</url><link>/</link><width>144</width><height>114</height><description>Software Engineer and Consultant</description></image>	<item>
		<title>wordpress.org Cracked, Exploit in 2.1.1 Release</title>
		<link>/articles/wordpress-org-cracked-exploit-in-2-1-1-release/</link>
					<comments>/articles/wordpress-org-cracked-exploit-in-2-1-1-release/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sat, 03 Mar 2007 03:08:33 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[rant]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2007/03/03/wordpressorg-cracked-exploit-in-211-release/</guid>

					<description><![CDATA[As pointed out on the WordPress development blog, a cracker gained access to the wordpress.org servers and replaced the 2.1.1 download with a modified exploitable version. The exploitable download may have been on the site for three or four days! It may be a good idea for the WordPress developers to sign their releases with<br />[&#8594; <a href="/articles/wordpress-org-cracked-exploit-in-2-1-1-release/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As pointed out on the <a href="http://wordpress.org/development/2007/03/upgrade-212/">WordPress development blog</a>, a cracker gained access to the wordpress.org servers and replaced the 2.1.1 download with a modified exploitable version. The exploitable download may have been on the site for three or four days!</p>
<p>It may be a good idea for the <a href="http://wordpress.org/" rel="tag">WordPress</a> developers to sign their releases with a well known and trusted PGP key. This would allow people to verify that downloaded files are really what they should be!<br />
This is a well-established practice used by other projects, for example by the <a href="http://kernel.org/signature.html">Linux kernel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/wordpress-org-cracked-exploit-in-2-1-1-release/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">49</post-id>	</item>
		<item>
		<title>WordPress SSL Patch Update</title>
		<link>/articles/wordpress-ssl-patch-update/</link>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Fri, 12 Jan 2007 16:34:46 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2007/01/12/wordpress-ssl-patch-update/</guid>

					<description><![CDATA[The recently released security update for WordPress introduced some changes that broke my HTTPS patch for it. I have updated the patch for WordPress 2.0.6 and 2.0.7-RC1 now: wp2-ssl.patch. Read the complete SSL setup guide here: Securing WordPress 2 Admin Access With SSL Regarding WordPress security, please note that there still is a possible exploit<br />[&#8594; <a href="/articles/wordpress-ssl-patch-update/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>The recently released security update for <a href="http://wordpress.org/" rel="tag">WordPress</a> introduced some changes that broke my HTTPS patch for it. I have updated the patch for WordPress 2.0.6 and 2.0.7-RC1 now: <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</p>
<p>Read the complete SSL setup guide here: <a href="/2006/01/22/securing-wordpress-2-admin-access-with-ssl/">Securing WordPress 2 Admin Access With SSL</a></p>
<p>Regarding WordPress security, please note that there still is a possible exploit for 2.0.6: <a href="http://www.heise-security.co.uk/news/83575"> New WordPress exploit also affects version 2.0.6</a><br />
Make sure you use safe a PHP version and set <code>register_globals = off</code>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">48</post-id>	</item>
		<item>
		<title>Securing WordPress 2 Admin Access With SSL</title>
		<link>/articles/securing-wordpress-2-admin-access-with-ssl/</link>
					<comments>/articles/securing-wordpress-2-admin-access-with-ssl/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 22 Jan 2006 20:34:42 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2006/01/22/securing-wordpress-2-admin-access-with-ssl/</guid>

					<description><![CDATA[A few people have asked for an updated version of my Securing WordPress Admin Access With SSL guide. So here is an updated version for WordPress 2! The situation has not changed much since WordPress 1.5: WordPress 2.0 still does not support HTTPS access to the admin area when the rest of the blog is<br />[&#8594; <a href="/articles/securing-wordpress-2-admin-access-with-ssl/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>A few people have asked for an updated version of my <a href="/2005/05/18/securing-wordpress-admin-access-with-ssl/">Securing WordPress Admin Access With SSL</a> guide. So here is an updated version for <a href="http://wordpress.org/" rel="tag">WordPress</a> 2!</p>
<p>The situation has not changed much since WordPress 1.5: WordPress 2.0 still does not support HTTPS access to the admin area when the rest of the blog is served via normal HTTP and I still do not like logging in to my server over unencrypted connections, especially not when using public WLANs. Getting around this WordPress limitation requires quite a few steps:</p>
<h3>The Goal</h3>
<p>All communication involving passwords or authentication cookies should be done over HTTPS connections. <code>wp-login.php</code> and the <code>wp-admin</code> directory should only be accessible over HTTPS.<br />
Normal reading access, as well as comments, tracebacks, and pingbacks still should go over ordinary HTTP.</p>
<h3>The Plan</h3>
<ul>
<li>Add an HTTPS virtual host that forwards requests to the HTTP virtual host</li>
<li>Modify WordPress to send <em>secure</em> authentication cookies, so cookies never get sent over insecure connections accidentally</li>
<li>Require a valid certificate on HTTPS clients. That means to log in to WordPress you need both a valid certificate and a valid password.  If someone manages to get your password, he still can not login because he does not have a valid certificate.</li>
</ul>
<h3>The Implementation</h3>
<p>Note: This documentation assumes a <a href="http://www.debian.org/">Debian</a> sarge installation with <a href="http://httpd.apache.org/" rel="tag">Apache</a> 2. Some things, in particular Apache module related ones, will be different on other systems.<br />
The server used throughout the instructions is example.org/192.0.34.166. The server&#8217;s <code>DocumentRoot</code> is /blog and WordPress resides in /blog/wp. The value of WordPress&#8217; <code>home</code> option is &#8216;http://example.org&/#8217; and the value of its <code>site_url</code> option is &#8216;http://example.org/wp&#8217;.</p>
<ul>
<li>Prepare the SSL certificates:
<ul>
<li>Generate your own certificate authority (CA) if you don&#8217;t have one already (I&#8217;m using the makefile from <a href="http://sial.org/howto/openssl/ca/">OpenSSL Certificate Authority Setup</a> for managing mine) and import it into your browser.</li>
<li>Generate a certificate for the SSL server and certify it with your private CA.</li>
<li>Generate a certificate for your browser and certify it with your private CA. Most browsers expect a <abbr title="Public-Key Cryptography Standard">PKCS</abbr>#12 file, so generate one with
<pre>$ openssl pkcs12 -export -clcerts &#92;
    -in blogclient.cert &#92;
    -inkey blogclient.key &#92;
    -out blogclient.p12</pre>
<p>Then import <code>blogclient.p12</code> into your browser.</p>
</li>
</ul>
</li>
<li>Make WordPress SSL-ready:<br />
Apply this <a href="/static/wp/wp2-ssl.patch">patch</a> to the WordPress code. It makes the following changes:</p>
<ul>
<li>Use <em>secure</em> authentication cookies in <code>wp_setcookie()</code></li>
<li>Make <code>check_admin_referer()</code> work with HTTPS URLs</li>
<li>Use HTTPS URLs for notification mails</li>
<li>Use HTTPS URLS for redirects to <code>wp-login.php</code></li>
<li>Only allow XML-RPC logins from the local host (ie. the HTTPS proxy)</li>
<li>Add the <em>Mark-as-Spam</em> feature from trunk</li>
</ul>
<p>The patch is against <a href="http://subversion.tigris.org/">svn</a> version 3825 of WordPress (ie. WordPress 2.0.3), when you apply it to a newer version, you will likely get some harmless ‘<code>Hunk succeeded</code>’ message. If you are getting ‘<code>Hunk FAILED</code>’ message, just send me note and I&#8217;ll update the patch.</p>
</li>
<li>Enable the necessary Apache modules:
<ul>
<li>Install <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.  It will be used to replace absolute &#8216;http://example.org&/#8217; HTTP URLs in the WordPress output with &#8216;https://example.org&/#8217; HTTPS URLs:
<pre>$ aptitude install libapache2-mod-proxy-html</pre>
<p>The module gets enabled automatically after installation.</p>
</li>
<li>Enable mod_proxy and mod_ssl
<pre>$ a2enmod proxy
$ a2enmod ssl</pre>
<p>Debian provides sane default configurations for both modules. You might want to take a look at the configuration files (<code>ssl.conf</code> and <code>proxy.conf</code>) nevertheless.<br />
I have changed <code>SSLCipherSuite</code> to</p>
<pre style="overflow:scroll;width:93%;">TLSv1:SSLv3:!SSLv2:!aNULL:!eNULL:!NULL:!EXP:!DES:!MEDIUM:!LOW:@STRENGTH</pre>
<p>in <code>ssl.conf</code> in order to just allow TLS v1 and SSL v3 ciphers which provide strong encryption and authentication (see <a href="http://www.openssl.org/docs/apps/ciphers.html">ciphers(1)</a>).</p>
</li>
<li>If you are compressing WordPress output (that is if you enabled the <em>&#8216;WordPress should compress articles (gzip) if browsers ask for them&#8217;</em> option) then also enable mod_headers:
<pre>$ a2enmod headers</pre>
</li>
</ul>
</li>
<li>Configure Apache to listen on the HTTPS port
<pre>$ cat &gt; /etc/apache2/conf.d/ssl.conf &lt;&lt; EOF
&lt;IfModule mod_ssl.c&gt;
	Listen 443
&lt;/IfModule&gt;
EOF</pre>
</li>
<li>Modify the blog virtual host to limit access to <code>wp-login.php</code> and <code>wp-admin</code> to the local host. Also completely deny access to files which should never be accessed directly. Here is an example: <a href="/static/wp/10-wp2-example.org"><code>10-wp2-example.org</code></a></li>
<li>Now setup the HTTPS virtual server: <a href="/static/wp/20-wp2-example.org-ssl"><code>20-wp2-example.org-ssl</code></a><br />
If you are compressing WordPress output you have to enable the <code>RequestHeader</code> line.
</li>
<li>Enable the site and restart Apache
<pre>$ a2ensite 20-blog-ssl
$ /etc/init.d/apache2 restart</pre>
</li>
<li>Remove the old WP cookies from your browser</li>
<li>Test the new setup!</li>
</ul>
<p><em><strong>February 1st, 2006:</strong> <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a> updated for WordPress <a href="http://wordpress.org/development/2006/01/201-release/">2.0.1</a></em></p>
<p><em><strong>March 11st, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/03/security-202/">2.0.2</a> has been released, fixing some security issues. The HTTPS patch still applies fine to that version.</em></p>
<p><em><strong>March 19th, 2006:</strong> Updated <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>. Changes: Fix bug in list-manipulation.php, use HTTPS for &#8216;Login&#8217; and &#8216;Register&#8217; links, backport &#8216;Mark-as-Spam&#8217; feature from trunk</em></p>
<p><em><strong>May 1st, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/06/wordpress-203/">2.0.3</a> has been released. Here is the updated <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</em></p>
<p><em><strong>July 29th, 2006:</strong> WordPress <a href="http://wordpress.org/development/2006/07/wordpress-204/">2.0.4</a> has been released, fixing some security issues. Here is an updated version of the <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a>.</em></p>
<p><em><strong>January 12st, 2007:</strong> <a href="/static/wp/wp2-ssl.patch">wp2-ssl.patch</a> updated for 2.0.6 and 2.0.7-RC1</em></p>
<p><em><strong>January 15st, 2007:</strong> WordPress <a href="http://wordpress.org/development/2007/01/wordpress-207/">2.0.7</a> has been released. The patch still applies fine to that version.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/securing-wordpress-2-admin-access-with-ssl/feed/</wfw:commentRss>
			<slash:comments>32</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">43</post-id>	</item>
		<item>
		<title>WordPress Security Annoyances</title>
		<link>/articles/wordpress-security-annoyances/</link>
					<comments>/articles/wordpress-security-annoyances/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Thu, 18 Aug 2005 06:46:54 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/?p=38</guid>

					<description><![CDATA[As if the unprofessional handling of WordPress security announcements (see Another WordPress Security Update and More on Security Announcements) wouldn&#8217;t be bad enough, the WordPress developers also seem to have problems with organizing releases. Stefan Esser reports that there are two WordPress 1.5.2 versions. The first one, which didn&#8217;t fix the problem it was supposed<br />[&#8594; <a href="/articles/wordpress-security-annoyances/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>As if the unprofessional handling of <a href="http://wordpress.org/" rel="tag">WordPress</a> security announcements (see <a href="/2005/08/14/another-wordpress-security-update/">Another WordPress Security Update</a> and <a href="/2005/08/15/more-on-security-announcements/">More on Security Announcements</a>) wouldn&#8217;t be bad enough, the WordPress developers also seem to have problems with organizing releases.</p>
<p>Stefan Esser <a href="http://blog.php-security.org/archives/8-WordPress-irresponsible-silent-tarball-update.html">reports</a> that there are two WordPress 1.5.2 versions. The first one, which didn&#8217;t fix the problem it was supposed to fix, was available for download for several hours before it silently was replaced by the fixed second version.</p>
<p>It&#8217;s hard to understand why the version number wasn&#8217;t bumped for the second release and why the WordPress developers didn&#8217;t inform users about the mistake.</p>
<p>The <a href="http://dougal.gunters.org/blog/2005/08/17/wordpress-152-security-fud">comments</a> from the WordPress crowd are a bit weak in my opinion. If there&#8217;s FUD about WordPress&#8217; security it&#8217;s the sole fault of the WordPress developers!</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/wordpress-security-annoyances/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">38</post-id>	</item>
		<item>
		<title>More on Security Announcements</title>
		<link>/articles/more-on-security-announcements/</link>
					<comments>/articles/more-on-security-announcements/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Mon, 15 Aug 2005 19:18:07 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/08/15/more-on-security-announcements/</guid>

					<description><![CDATA[Some people seem to misunderstand what I said about the latest WordPress update. I, myself, am perfectly able to figure out what was broken and how it was fixed. That&#8217;s not the point. I was commenting on the handling of security announcements by the WordPress developers. I expect to get information about security issues from<br />[&#8594; <a href="/articles/more-on-security-announcements/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p>Some people seem to misunderstand what I <a href="/2005/08/14/another-wordpress-security-update/">said</a> about the latest WordPress update.</p>
<p>I, myself, am perfectly able to figure out what was broken and how it was fixed. That&#8217;s not the point. I was commenting on the handling of security announcements by the WordPress developers.</p>
<p>I expect to get information about security issues from a central, easy-findable place from any project or product that has public exposure and  more than a handful of users. (Yes, I expect that from open source projects too. Look around the net to see how good others handle it.)<br />
Expecting your users to gather information about a problem from forums, blogs, foreign sites, or the source code is simply unprofessional.</p>
<p>The often used argument that more specific information only helps hackers is just plain naïve: WordPress is open source, its code and even nicely formatted svn changesets are freely available on the web. Hackers are not stupid, they&#8217;ll find the issues.</p>
<p>Note, I&#8217;m not saying you should post sample exploits publicly. Just give enough information that administrators can determine whether their systems are vulnerable and how severe the problem is. Again,  go around the net and look how other projects handle security announcements.</p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/more-on-security-announcements/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">37</post-id>	</item>
		<item>
		<title>Another WordPress Security Update</title>
		<link>/articles/another-wordpress-security-update/</link>
					<comments>/articles/another-wordpress-security-update/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Sun, 14 Aug 2005 20:00:31 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/08/14/another-wordpress-security-update/</guid>

					<description><![CDATA[WordPress 1.5.2 &#8220;Strayhorn&#8221; has been released today. The changelog mentions that several vulnerabilities have been fixed but &#8212; once again &#8212; the developers don&#8217;t provide any details! One has to look at the diffs to see what has been fixed. I hate that kind of silly security by obscurity. Vague vulnerability descriptions are almost useless<br />[&#8594; <a href="/articles/another-wordpress-security-update/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><a href="http://wordpress.org/" rel="tag">WordPress</a> <a href="http://wordpress.org/development/2005/08/one-five-two/">1.5.2</a> &#8220;Strayhorn&#8221; has been released today. The changelog mentions that several vulnerabilities have been fixed but &#8212; once again &#8212; the developers don&#8217;t provide any details! One has to look at the diffs to see what has been fixed.</p>
<p> I hate that kind of silly <em>security by obscurity</em>. Vague vulnerability descriptions are almost useless for administrators, just saying &#8220;we&#8217;ve fixed some security problems&#8221; is even worse!</p>
<p><em><strong>August 15th, 2005:</strong> See this <a href="/2005/08/15/more-on-security-announcements/">article</a> for a reply to some comments I&#8217;ve received.</em></p>
<p><em><strong>August 18th, 2005:</strong> The WordPress developers seem to have problems with release management too: There are two different 1.5.2 versions, read more in <a href="/2005/08/18/wordpress-security-annoyances/">WordPress Security Annoyances</a>.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>/articles/another-wordpress-security-update/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">36</post-id>	</item>
		<item>
		<title>Securing WordPress Admin Access With SSL</title>
		<link>/articles/securing-wordpress-admin-access-with-ssl/</link>
					<comments>/articles/securing-wordpress-admin-access-with-ssl/#comments</comments>
		
		<dc:creator><![CDATA[Jürgen Kreileder]]></dc:creator>
		<pubDate>Tue, 17 May 2005 23:11:24 +0000</pubDate>
				<category><![CDATA[Config]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">http://blog.blackdown.de/2005/05/18/securing-wordpress-admin-access-with-ssl/</guid>

					<description><![CDATA[January 22nd, 2006: There&#8217;s an updated version of this guide for WordPress 2 now: Securing WordPress 2 Admin Access With SSL As one can guess from the look of this site, I&#8217;m using WordPress as my blog engine. At this time WordPress does not support HTTPS access to the admin area when the rest of<br />[&#8594; <a href="/articles/securing-wordpress-admin-access-with-ssl/" class="more-link">Read the rest of this entry</a>]]]></description>
										<content:encoded><![CDATA[<p><em><strong>January 22nd, 2006:</strong> There&#8217;s an updated version of this guide for WordPress 2 now: <a href="/2006/01/22/securing-wordpress-2-admin-access-with-ssl/">Securing WordPress 2 Admin Access With SSL</a></em></p>
<p>As one can guess from the look of this site, I&#8217;m using <a href="http://wordpress.org/" rel="tag">WordPress</a> as my blog engine. At this time WordPress does not support HTTPS access to the admin area when the rest of the blog is served via normal HTTP. This is a bit unfortunate. I do not like logging in to my server over unencrypted connections, especially not when using public WLANs. Getting around this WordPress limitation requires quite a few steps:</p>
<h3>The Goal</h3>
<p>All communication involving passwords or authentication cookies should be done over HTTPS connections. <code>wp-login.php</code> and the <code>wp-admin</code> directory should only be accessible over HTTPS.<br />
Normal reading access, as well as comments, tracebacks, and pingbacks still should go over ordinary HTTP.</p>
<h3>The Plan</h3>
<ul>
<li>Add an HTTPS virtual host that forwards requests to the HTTP virtual host</li>
<li>Modify WordPress to send <em>secure</em> authentication cookies, so cookies never get sent over insecure connections accidentally</li>
<li>Require a valid certificate on HTTPS clients. That means to log in to WordPress you need both a valid certificate and a valid password.  If someone manages to get your password, he still can not login because he does not have a valid certificate.</li>
</ul>
<h3>The Implementation</h3>
<p>Note: This documentation assumes a <a href="http://www.debian.org/">Debian</a> sarge installation with <a href="http://httpd.apache.org/" rel="tag">Apache</a> 2. Some things, in particular Apache module related ones, will be different on other systems.<br />
The server used throughout the instructions is example.org/192.0.34.166. The server&#8217;s <code>DocumentRoot</code> is /blog and WordPress resides in /blog/wp. The value of WordPress&#8217; <code>home</code> option is &#8216;http://example.org&/#8217; and the value of its <code>site_url</code> option is &#8216;http://example.org/wp&#8217;.</p>
<ul>
<li>Prepare the SSL certificates:
<ul>
<li>Generate your own certificate authority (CA) if you don&#8217;t have one already (I&#8217;m using the makefile from <a href="http://sial.org/howto/openssl/ca/">OpenSSL Certificate Authority Setup</a> for managing mine) and import it into your browser.</li>
<li>Generate a certificate for the SSL server and certify it with your private CA.</li>
<li>Generate a certificate for your browser and certify it with your private CA. Most browsers expect a <abbr title="Public-Key Cryptography Standard">PKCS</abbr>#12 file, so generate one with
<pre>$ openssl pkcs12 -export -clcerts &#92;
    -in blogclient.cert &#92;
    -inkey blogclient.key &#92;
    -out blogclient.p12</pre>
<p> Then import <code>blogclient.p12</code> into your browser.</p>
</li>
</ul>
</li>
<li>Make WordPress SSL-ready:<br />
Apply this <a href="/static/wp/wp-ssl.patch">patch</a> to the WordPress code. It makes the following changes:</p>
<ul>
<li>Use <em>secure</em> authentication cookies in <code>wp_setcookie()</code></li>
<li>Make <code>check_admin_referer()</code> working with HTTPS URLs</li>
<li>Disable login over XML-RPC</li>
</ul>
</li>
<li>Enable the necessary Apache modules:
<ul>
<li>Install <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>.  It will be used to replace absolute &#8216;http://example.org&/#8217; HTTP URLs in the WordPress output with &#8216;https://example.org&/#8217; HTTPS URLs:
<pre>$ aptitude install libapache2-mod-proxy-html</pre>
<p>The module gets enabled automatically after installation.</p>
</li>
<li>Enable mod_proxy and mod_ssl
<pre>$ a2enmod proxy
$ a2enmod ssl</pre>
<p>Debian provides sane default configurations for both modules. You might want to take a look at the configuration files (<code>ssl.conf</code> and <code>proxy.conf</code>) nevertheless.</p>
</li>
<li>If you are compressing WordPress output (that is if you enabled the <em>&#8216;WordPress should compress articles (gzip) if browsers ask for them&#8217;</em> option) then also enable mod_headers:
<pre>$ a2enmod headers</pre>
</li>
</ul>
</li>
<li>Configure Apache to listen on the HTTPS port
<pre>$ cat &gt; /etc/apache2/conf.d/ssl.conf &lt;&lt; EOF
&lt;IfModule mod_ssl.c&gt;
	Listen 443
&lt;/IfModule&gt;
EOF</pre>
</li>
<li>Modify the blog virtual host to limit access to <code>wp-login.php</code> and <code>wp-admin</code> to the local host. Also completely deny access to files which should never be accessed directly. Here is an example: <a href="/static/wp/10-example.org"><code>10-example.org</code></a></li>
<li>Now setup the HTTPS virtual server: <a href="/static/wp/20-example.org-ssl"><code>20-example.org-ssl</code></a><br />
If you are compressing WordPress output you have to enable the <code>RequestHeader</code> line.
</li>
<li>Enable the site and restart Apache
<pre>$ a2ensite 20-blog-ssl
$ /etc/init.d/apache2 restart</pre>
</li>
<li>Remove the old WP cookies from your browser</li>
<li>Test the new setup!</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>/articles/securing-wordpress-admin-access-with-ssl/feed/</wfw:commentRss>
			<slash:comments>20</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">28</post-id>	</item>
	</channel>
</rss>
