<?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>GrenadePod &#187; security</title>
	<atom:link href="http://www.grenadepod.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grenadepod.com</link>
	<description>Dispersing the Seeds</description>
	<lastBuildDate>Mon, 22 Feb 2010 20:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Basic Apache security</title>
		<link>http://www.grenadepod.com/2009/11/25/basic-apache-security/</link>
		<comments>http://www.grenadepod.com/2009/11/25/basic-apache-security/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 13:44:38 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=520</guid>
		<description><![CDATA[Below are just a few things to consider if you want to make your Apache installation more secure: Hide your identity Well, first of all you need to hide details about who you are, or rather what your webserver is. It is a good practice to always run on the latest security patch, but not [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/' rel='bookmark' title='Permanent Link: Sorting out YUM repositories on CentOS 5.4'>Sorting out YUM repositories on CentOS 5.4</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />Below are just a few things to consider if you want to make your Apache installation more secure:</p>
<h3>Hide your identity</h3>
<p>Well, first of all you need to hide details about who you are, or rather what your webserver is. It is a good practice to always run on the latest security patch, but not always feasible. So if you can&#8217;t upgrade in time, at least make attackers life harder by hiding details about your server:</p>
<pre>#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
# where Full conveys the most information, and Prod the least.
#
ServerTokens Prod

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature Off</pre>
<h3>Allow only basic HTTP methods</h3>
<p>HTTP protocol defines GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE and CONNECT methods. Guess how many of those are actually used (intensively). Yup, only two. Most of the webservers would do just fine with only GET and POST methods. You might however find that you need more, so enable them as you see fit. In the example below I only allow two basic, commonly used methods:</p>
<pre>&lt;Location /&gt;
   &lt;LimitExcept GET POST&gt;
     Order allow,deny
     Deny from all
   &lt;/LimitExcept&gt;
 &lt;/Location&gt;</pre>
<h3>Disable old and insecure SSL</h3>
<p>Use only new protocols and only strong ciphers.</p>
<pre>SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM</pre>
<h3>Disable modules that you don&#8217;t need</h3>
<p>Again, this depends on your installation and what you&#8217;re actually using, but in most of the cases most of the modules that Apache loads by default are not needed. Search for LoadModule instruction and remove anything you don&#8217;t need. Good list to start:</p>
<ul>
<li>mod_imap</li>
<li>mod_include</li>
<li>mod_info</li>
<li>mod_userdir</li>
<li>mod_status</li>
<li>mod_cgi</li>
<li>mod_autoindex</li>
<li>mod_dav</li>
</ul>
<h3>Other settings</h3>
<p>Reduce timeout, which is 300 seconds by default. Meaning that the server waits for 5 minutes before it decides that the client is no longer there. Reduce it to something sensible, like 20-30 seconds to avoid potential DDoS attacks.</p>
<pre>Timeout 20</pre>
<p>Disable directory browsing for any directory that has no index file:</p>
<pre>Options -Indexes</pre>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/' rel='bookmark' title='Permanent Link: Sorting out YUM repositories on CentOS 5.4'>Sorting out YUM repositories on CentOS 5.4</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/25/basic-apache-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing WordPress</title>
		<link>http://www.grenadepod.com/2009/11/21/securing-wordpress/</link>
		<comments>http://www.grenadepod.com/2009/11/21/securing-wordpress/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 10:15:08 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=457</guid>
		<description><![CDATA[No matter how good developers are (and I trust WordPress developers are one of the best bunch out there) they are still humans and make mistakes. When it comes to a security, one doesn&#8217;t need to make mistakes or introduce bugs in the code to make software or application vulnerable to external attacks. Software development [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/11/25/basic-apache-security/' rel='bookmark' title='Permanent Link: Basic Apache security'>Basic Apache security</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />No matter how good developers are (and I trust WordPress developers are one of the best bunch out there) they are still humans and make mistakes. When it comes to a security, one doesn&#8217;t need to make mistakes or introduce bugs in the code to make software or application vulnerable to external attacks.</p>
<p>Software development is really complex process and although  WordPress developers take security very seriously, you should also take extra measures to ensure safety and security of your blog/web site.</p>
<p>There are few simple steps to make your WordPress installation lot harder for attacker to compromise.</p>
<h3>WordPress software</h3>
<p>Always keep up to date. Flaws in security model are being identified and addressed immediately as soon as they are reported. So it&#8217;s important for you to always keep your WordPress installation up to date. It&#8217;s very easy to do now that WordPress has automatic update feature, where all you have to do is just to tell it to install the newer version of it.</p>
<h3>File permissions</h3>
<p>You need to make sure that webserver can modify only those files that it is allowed to. Do not rely on WordPress to enforce this, use file system permission model. All files in WordPress installation need to be owned and writeable to by the user that installed the system and not the user which is used to run webserver. Only exceprion to this is /wp-content/ directory, which contains uploaded contents.</p>
<blockquote><p>Make sure you perform all actions in whatever your WordPress installation directory is, and not outside of it!</p></blockquote>
<p>Let&#8217;s make all files owned by your user and set the group to web server group:</p>
<pre>
$ sudo chown -R myuser.www-data *
</pre>
<p>Then change all file permissions so that files can be written to by your user only, and read-only by other users:</p>
<pre>
$ find . -type d -exec chmod 755 {} \;
$ find . -type f -exec chmod 644 {} \;
</pre>
<p>Finally allow group write for wp-content/ directory, so that web server can do automatic updates for plugins and user content could be uploaded:</p>
<pre>
$ chmod -R g+w *
</pre>
<h3>Secure wp-admin access</h3>
<p>WordPress recommend using additional plugins and HTTP authentication to provide additional security to the administration pages, but I think this is not necessary if you implement the following two security measures: enforce SSL only traffic to /wp-admin/ and allow access only from certain IP addresses.</p>
<p>Make /wp-admin/ available on SSL connection only, so all traffic to and from (including passwords) is encrypted. This prevent attackers hijacking traffic and intercepting passwords and other sensitive data.</p>
<p>This may sound bit complicated, but bear with me, it&#8217;s not that scary as it may look like. So you will need two &lt;VirtualServer&gt; directives: one for normal web traffic and one for SSL.</p>
<p>In default HTTP definition, you then need to make a special case for /wp-admin/ URL, and enforce redirection to HTTPS, so whenever you try to access wp-admin/ using http:// you will be redirected to https:// instead. HTTPS VirtualHost on it turn has instructions to deny access from all, but only the IPs listed in the configuration:</p>
<pre>&lt;VirtualHost server_ip:80&gt;
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/virtual/www.example.com
    ErrorLog /var/log/apache2/www.example.com-error.log
    CustomLog /var/log/apache2/www.example.com-access.log combined
    &lt;Location /wp-admin/&gt;
        RewriteEngine on
        RewriteRule ^(.*)$ https://%{SERVER_NAME}/wp-admin/ [R=permanent,L]
    &lt;/Location&gt;
&lt;/VirtualHost&gt; 

&lt;VirtualHost server_ip:443&gt;
    ServerName example.com
    ServerAlias www.example.com
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/example.com.pem
    SSLCertificateKeyFile /etc/ssl/private/example.com.key
    DocumentRoot /var/www/virtual/www.example.com
    ErrorLog /var/log/apache2/www.example.com-error.log
    CustomLog /var/log/apache2/www.example.com-access.log combined
    &lt;Location /wp-admin&gt;
        Order deny,allow
        Deny from all
        Allow from trusted_ip_1
        Allow from trusted_ip_2
    &lt;/Location&gt;
&lt;/VirtualHost&gt;</pre>
<h3>Other security measures</h3>
<p>Install <a href="http://wordpress.org/extend/plugins/wp-security-scan/" target="_blank">WP Security scan plugin</a> which will provide a good overview of how your installation looks like from the security point of view.</p>
<p>Also remove advertising of the WordPress version that you are using. Add the following line to functions.php file, which you are using:</p>
<pre>
remove_action('wp_head', 'wp_generator');
</pre>
<p>And did I mention that you need to make regular backups?&#8230;</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/11/25/basic-apache-security/' rel='bookmark' title='Permanent Link: Basic Apache security'>Basic Apache security</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/21/securing-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
