<?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>SoftLayer Blog &#187; security</title>
	<atom:link href="http://blog.softlayer.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.softlayer.com</link>
	<description>A Behind the Scenes Look at the Best Hosting Provider in the World</description>
	<lastBuildDate>Wed, 15 May 2013 15:33:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Web Development &#8211; Installing mod_security with OWASP</title>
		<link>http://blog.softlayer.com/2013/web-development-installing-mod_security-with-owasp/</link>
		<comments>http://blog.softlayer.com/2013/web-development-installing-mod_security-with-owasp/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 20:45:39 +0000</pubDate>
		<dc:creator>Cassandra Wolff</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[modsecurity]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[OWASP]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=11229</guid>
		<description><![CDATA[You want to secure your web application, but you don&#8217;t know where to start. A number of open-source resources and modules exist, but that variety is more intimidating than it is liberating. If you&#8217;re going to take the time to implement application security, you don&#8217;t want to put your eggs in the wrong basket, so [...]]]></description>
			<content:encoded><![CDATA[<p>You want to secure your web application, but you don&#8217;t know where to start. A number of open-source resources and modules exist, but that variety is more intimidating than it is liberating. If you&#8217;re going to take the time to implement application security, you don&#8217;t want to put your eggs in the wrong basket, so you wind up suffering from analysis paralysis as you compare all of the options. You want a powerful, flexible security solution that isn&#8217;t overly complex, so to save you the headache of making the decision, I&#8217;ll make it for you: Start with mod_security and OWASP.</p>
<p><a href="http://www.modsecurity.org/">ModSecurity</a> (mod_security) is an open-source Apache module that acts as a web application firewall. It is used to help protect your server (and websites) from several methods of attack, most common being brute force. You can think of mod_security as an invisible layer that separates users and the content on your server, quietly monitoring HTTP traffic and other interactions. It&#8217;s easy to understand and simple to implement.</p>
<p>The challenge is that without some advanced configuration, mod_security isn&#8217;t very functional, and that advanced configuration can get complex pretty quickly. You need to determine and set additional rules so that mod_security knows how to respond when approached with a potential threat. That&#8217;s where <a href="https://www.owasp.org/index.php/Main_Page">Open Web Application Security Project</a> (OWASP) comes in. You can think of the OWASP as an enhanced core ruleset that the mod_security module will follow to prevent attacks on your server.</p>
<p>The process of getting started with mod_security and OWASP might seem like a lot of work, but it&#8217;s actually quite simple. Let&#8217;s look at the installation and configuration process in a CentOS environment. First, we want to install the dependencies that mod_security needs:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Install the GCC compiler and mod_security dependencies ##</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #c20cb9; font-weight: bold;">make</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> yum <span style="color: #c20cb9; font-weight: bold;">install</span> libxml2 libxml2-devel httpd-devel pcre-devel curl-devel</pre></div></div>

<p>Now that we have the dependencies in place, let&#8217;s install mod_security. Unfortunately, there is no yum for mod_security because it is not a maintained package, so you&#8217;ll have to install it directly from the source:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Get mod_security from its source ##</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
$ <span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>SpiderLabs<span style="color: #000000; font-weight: bold;">/</span>ModSecurity.git</pre></div></div>

<p>Now that we have mod_security on our server, we&#8217;ll install it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Install mod_security ##</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> ModSecurity
$ .<span style="color: #000000; font-weight: bold;">/</span>configure
$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>And we&#8217;ll copy over the default mod_security configuration file into the necessary Apache directory:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Copy configuration file ##</span>
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> modsecurity.conf-recommended <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>conf.d<span style="color: #000000; font-weight: bold;">/</span>modsecurity.conf</pre></div></div>

<p>We&#8217;ve got mod_security installed now, so we need to tell Apache about it &#8230; It&#8217;s no use having mod_security installed if our server doesn&#8217;t know it&#8217;s supposed to be using it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Apache configuration for mod_security ##</span>
$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></div></div>

<p>We&#8217;ll need to load our Apache config file to include our dependencies (BEFORE the mod_security module) and the mod_security file module itself:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Load dependencies ##</span>
LoadFile <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>libxml2.so
LoadFile <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>liblua5.1.so
<span style="color: #666666; font-style: italic;">## Load mod_security ##</span>
LoadModule security2_module modules<span style="color: #000000; font-weight: bold;">/</span>mod_security2.so</pre></div></div>

<p>We&#8217;ll save our configuration changes and restart Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Restart Apache! ##</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>httpd restart</pre></div></div>

<p>As I mentioned at the top of this post, our installation of mod_security is good, but we want to enhance our ruleset with the help of OWASP. If you&#8217;ve made it this far, you won&#8217;t have a problem following a similar process to install OWASP:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## OWASP ##</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">git</span> clone https:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>SpiderLabs<span style="color: #000000; font-weight: bold;">/</span>owasp-modsecurity-crs.git
$ <span style="color: #c20cb9; font-weight: bold;">mv</span> owasp-modsecurity-crs modsecurity-crs</pre></div></div>

<p>Just like with mod_security, we&#8217;ll set up our configuration file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## OWASP configuration file ##</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> modsecurity-crs
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> modsecurity_crs_10_setup.conf.example modsecurity_crs10_config.conf</pre></div></div>

<p>Now we have mod_security and the OWASP core ruleset ready to go! The last step we need to take is to update the Apache config file to set up our basic ruleset:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Apache configuration ##</span>
$ <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>httpd<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>httpd.conf</pre></div></div>

<p>We&#8217;ll add an IfModule and point it to our new OWASP rule set at the end of the file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule security2_module<span style="color: #000000; font-weight: bold;">&gt;</span>
    Include modsecurity-crs<span style="color: #000000; font-weight: bold;">/</span>modsecurity_crs_10_config.conf
    Include modsecurity-crs<span style="color: #000000; font-weight: bold;">/</span>base_rules<span style="color: #000000; font-weight: bold;">/*</span>.conf
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>And to complete the installation, we save the config file and restart Apache:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">## Restart Apache! ##</span>
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>httpd restart</pre></div></div>

<p>And we&#8217;ve got mod_security installed with the OWASP core ruleset! With this default installation, we&#8217;re leveraging the rules the OWASP open source community has come up with, and we have the flexibility to tweak and enhance those rules as our needs dictate. If you have any questions about this installation or you have any other technical blog topics you&#8217;d like to hear from us about, please let us know!</p>
<p>-Cassandra</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2013/web-development-installing-mod_security-with-owasp/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>iptables Tips and Tricks: CSF Configuration</title>
		<link>http://blog.softlayer.com/2013/iptables-tips-and-tricks-csf-configuration/</link>
		<comments>http://blog.softlayer.com/2013/iptables-tips-and-tricks-csf-configuration/#comments</comments>
		<pubDate>Tue, 19 Mar 2013 18:10:39 +0000</pubDate>
		<dc:creator>Mark Ridlen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[APF]]></category>
		<category><![CDATA[blocking]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[CSF]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[iptab]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[tips and tricks]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=10812</guid>
		<description><![CDATA[In our last &#8220;iptables Tips and Tricks&#8221; installment, we talked about Advanced Policy Firewall (APF) configuration, so it should come as no surprise that in this installment, we&#8217;re turning our attention to ConfigServer Security &#38; Firewall (CSF). Before we get started, you should probably run through the list of warnings I include at the top [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://blog.softlayer.com/2013/iptables-tips-and-tricks-apf-advanced-policy-firewall-configuration/">our last &#8220;iptables Tips and Tricks&#8221; installment</a>, we talked about Advanced Policy Firewall (APF) configuration, so it should come as no surprise that in this installment, we&#8217;re turning our attention to <a href="http://configserver.com/cp/csf.html">ConfigServer Security &amp; Firewall</a> (CSF). Before we get started, you should probably run through the list of warnings I include at the top of the APF blog post and make sure you have your Band-Aid ready in case you need it.</p>
<p>To get the ball rolling, we need to download CSF and install it on our server. In this post, we&#8217;re working with a CentOS 6.0 32-bit server, so our (root) terminal commands would look like this to download and install CSF:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>www.configserver.com<span style="color: #000000; font-weight: bold;">/</span>free<span style="color: #000000; font-weight: bold;">/</span>csf.tgz <span style="color: #666666; font-style: italic;">#Download CSF using wget.</span>
$ <span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf csf.tgz <span style="color: #666666; font-style: italic;">#Unpack it.</span>
$ yum <span style="color: #c20cb9; font-weight: bold;">install</span> perl-libwww-perl <span style="color: #666666; font-style: italic;">#Make sure perl modules are installed ...</span>
$ yum <span style="color: #c20cb9; font-weight: bold;">install</span> perl-Time-HiRes  <span style="color: #666666; font-style: italic;">#Otherwise it will generate an error.</span>
$ <span style="color: #7a0874; font-weight: bold;">cd</span> csf
$ .<span style="color: #000000; font-weight: bold;">/</span>install.sh <span style="color: #666666; font-style: italic;">#Install CSF.</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#MAKE SURE YOU HAVE YOUR BAND-AID READY</span>
&nbsp;
$ <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>csf start <span style="color: #666666; font-style: italic;">#Start CSF. (Note: You can also use '$ service csf start')</span></pre></div></div>

<p>Once you start CSF, you can see a list of the default rules that load at startup. CSF defaults to a DROP policy:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ iptables <span style="color: #660033;">-nL</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> policy
Chain INPUT <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy DROP<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Chain FORWARD <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy DROP<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Chain OUTPUT <span style="color: #7a0874; font-weight: bold;">&#40;</span>policy DROP<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Don&#8217;t ever run &#8220;<code>iptables -F</code>&#8221; unless you want to lock yourself out. In fact, you might want to add &#8220;This server is running CSF &#8211; do not run &#8216;iptables -F&#8217;&#8221;  to your <code>/etc/motd</code>, just as a reminder/warning to others.</p>
<p>CSF loads on startup by default. This means that if you get locked out, a simple reboot probably won&#8217;t fix the problem. Runlevels 2, 3, 4, and 5 are all on:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ chkconfig <span style="color: #660033;">--list</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> csf
csf             <span style="color: #000000;">0</span>:off   <span style="color: #000000;">1</span>:off   <span style="color: #000000;">2</span>:on    <span style="color: #000000;">3</span>:on    <span style="color: #000000;">4</span>:on    <span style="color: #000000;">5</span>:on    <span style="color: #000000;">6</span>:off</pre></div></div>

<p>Some features of CSF will not work unless you have certain iptables modules installed. I believe they are installed by default in CentOS, but if you custom-built your iptables, they might not all be installed. Run this script to see if all modules are installed:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf<span style="color: #000000; font-weight: bold;">/</span>csftest.pl
Testing ip_tables<span style="color: #000000; font-weight: bold;">/</span>iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport<span style="color: #000000; font-weight: bold;">/</span>xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state<span style="color: #000000; font-weight: bold;">/</span>xt_state...OK
Testing ipt_limit<span style="color: #000000; font-weight: bold;">/</span>xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner<span style="color: #000000; font-weight: bold;">/</span>xt_owner...OK
Testing iptable_nat<span style="color: #000000; font-weight: bold;">/</span>ipt_REDIRECT...OK
Testing iptable_nat<span style="color: #000000; font-weight: bold;">/</span>ipt_DNAT...OK
&nbsp;
RESULT: csf should <span style="color: #000000; font-weight: bold;">function</span> on this server</pre></div></div>

<p>As I mentioned, this is the default iptables installation on a minimal CentOS 6.0 image, so chances are good that these modules are already installed on your system. It never hurts to check, though.</p>
<h3>The CSF Configuration File</h3>
<p>The primary CSF configuration is stored in the well-documented <code>/etc/csf/csf.conf</code> file. CSF is <em>extremely</em> configurable, so there are a lot of options to read over. Let&#8217;s take a look over some of the more important features:</p>
<p><span id="more-10812"></span></p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Testing</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">TESTING = <span style="color: #ff0000;">&quot;1&quot;</span>
TESTING_INTERVAL = <span style="color: #ff0000;">&quot;5&quot;</span></pre></div></div>

<p>This TESTING cron job runs every &#8220;5&#8243; minutes so you don&#8217;t lock yourself out when you&#8217;re testing your rules. When you are satisfied with your rules (and confident that you won&#8217;t lock yourself out), you can set TESTING to &#8220;0&#8243;.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Globally Allowed Ports</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Allow incoming TCP ports</span>
TCP_IN = <span style="color: #ff0000;">&quot;20,21,22,25,53,80,110,143,443,465,587,993,995&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Allow outgoing TCP ports</span>
TCP_OUT = <span style="color: #ff0000;">&quot;20,21,22,25,53,80,110,113,443&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Allow incoming UDP ports</span>
UDP_IN = <span style="color: #ff0000;">&quot;20,21,53&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Allow outgoing UDP ports</span>
<span style="color: #666666; font-style: italic;"># To allow outgoing traceroute add 33434:33523 to this list</span>
UDP_OUT = <span style="color: #ff0000;">&quot;20,21,53,113,123&quot;</span></pre></div></div>

<p style="margin-bottom:0; padding-bottom:5px;"><strong>Incoming Ping Requests</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Allow incoming PING</span>
ICMP_IN = <span style="color: #ff0000;">&quot;1&quot;</span></pre></div></div>

<p>Allowing ping is usually a good option for diagnostic purposes, so I don&#8217;t recommend turning it off. Disallowing ping is an example of &#8220;security through obscurity,&#8221; and it will not typically dissuade your attackers.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Ethernet Device</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ETH_DEVICE = <span style="color: #ff0000;">&quot;&quot;</span>
ETH6_DEVICE = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>Here, you can configure iptables to ONLY use one Ethernet adapter. You might want to only guard your public network adapter in some situations.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>IP Limit in Permanent &#8220;Deny&#8221; File</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DENY_IP_LIMIT = <span style="color: #ff0000;">&quot;200&quot;</span></pre></div></div>

<p>A higher number here will obviously screen out more IP addresses in <code>csf.deny</code>, but higher numbers also may cause slowdowns.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>IP Limit in Temporary &#8220;Deny&#8221; File</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DENY_TEMP_IP_LIMIT = <span style="color: #ff0000;">&quot;100&quot;</span></pre></div></div>

<p>Similar to DENY_IP_LIMIT, the DENY_TEMP_IP_LIMIT represents the maximum number of IPs that can be stored in the temporary ban list.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>SMTP Blocking</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SMTP_BLOCK = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>When set to &#8220;1&#8243;, SMTP_BLOCK does not completely block outbound SMTP, but it does block it for most users. This will prevent malicious scripts and compromised users from making outbound connections from unauthorized mail clients on the server. SMTP_BLOCK doesn&#8217;t stop those scripts from running, but it does stop them from functioning. Mail sent through the proper channels will still be delivered normally.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Allowing SMTP on localhost</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SMTP_ALLOWLOCAL = <span style="color: #ff0000;">&quot;1&quot;</span></pre></div></div>

<p style="margin-bottom:0; padding-bottom:5px;"><strong>Custom Mail Port Designation</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SMTP_PORTS = <span style="color: #ff0000;">&quot;25,465,587&quot;</span></pre></div></div>

<p style="margin-bottom:0; padding-bottom:5px;"><strong>Allowing SMTP Access to Users/Groups</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SMTP_ALLOWUSER = <span style="color: #ff0000;">&quot;&quot;</span>
SMTP_ALLOWGROUP = <span style="color: #ff0000;">&quot;mail,mailman&quot;</span></pre></div></div>

<p style="margin-bottom:0; padding-bottom:5px;"><strong>SYN Flood Protection</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SYNFLOOD = <span style="color: #ff0000;">&quot;0&quot;</span>
SYNFLOOD_RATE = <span style="color: #ff0000;">&quot;100/s&quot;</span>
SYNFLOOD_BURST = <span style="color: #ff0000;">&quot;150&quot;</span></pre></div></div>

<p>Per the documentation, you should only enable SYN flood protection (SYNFLOOD= &#8220;1&#8243;) if you are currently under a SYN flood attack.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Concurrent Connections Limit</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">CONNLIMIT = <span style="color: #ff0000;">&quot;22;5,80;20&quot;</span>
PORTFLOOD = <span style="color: #ff0000;">&quot;22;tcp;5;300,80;tcp;20;5</span></pre></div></div>

<p>These options allow you to add customized DoS protection. CONNLIMIT handles the number of concurrent connections, and in this example, we&#8217;re limiting port 22 to 5 connections and port 80 to 20 connections.</p>
<p>PORTFLOOD on deals with connections per second. In this example, we&#8217;re limiting the TCP connection on port 22 to 5 connections/second with a quiet period of 300 seconds before the connection is unblocked. Additonally, we&#8217;re limiting the TCP connection on port 80 to 20 connections/second with a quiet period of 5 seconds before the connection is unblocked.</p>
<p>Check the <code>readme.txt</code> file for more information about the syntax.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Logging to Syslog</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">SYSLOG = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>When enabled, this option logs lfd (Login Failure Daemon) messages to syslog as well as to <code>/var/log/lfd.log</code>.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Dropping v. Rejecting Packets</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DROP = <span style="color: #ff0000;">&quot;DROP&quot;</span></pre></div></div>

<p>This configuration allows you to either DROP or REJECT packets. REJECT tells the sender that the packet has been blocked by the firewall. DROP just drops the packet and does not send a response. I like DROP better for regular use, but REJECT might be more helpful if you need to diagnose a connectivity issue.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Logging Dropped Connections</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DROP_LOGGING = <span style="color: #ff0000;">&quot;1&quot;</span></pre></div></div>

<p>This option logs dropped connections to syslog. I don&#8217;t see any reason to turn this off unless your hard drive is getting full.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Port Exceptions When Logging Dropped Connections</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DROP_NOLOG = <span style="color: #ff0000;">&quot;67,68,111,113,135:139,445,500,513,520&quot;</span></pre></div></div>

<p>These ports are specifically blocked from being logged either to conserve hard drive space or make the log file easier to read.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>&#8220;Watch Mode&#8221;</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">WATCH_MODE = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>If you are ever stuck trying to troubleshoot a large ruleset, you might consider turning this option on. You can use it to track the actions to watched IP addresses to see where they are getting blocked or accepted.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Login Failure Daemon Alert</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_ALERT_TO = <span style="color: #ff0000;">&quot;&quot;</span>
LF_ALERT_FROM = <span style="color: #ff0000;">&quot;&quot;</span>
LF_ALERT_SMTP = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>You can specify an email address to report errors from the Login Failure Daemon, which tracks and automatically blocks brute force login attempts.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Permanent Blocks and NetBlocks</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_PERMBLOCK = <span style="color: #ff0000;">&quot;1&quot;</span>
LF_PERMBLOCK_INTERVAL = <span style="color: #ff0000;">&quot;86400&quot;</span>
LF_PERMBLOCK_COUNT = <span style="color: #ff0000;">&quot;4&quot;</span>
LF_PERMBLOCK_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span>
LF_NETBLOCK = <span style="color: #ff0000;">&quot;0&quot;</span>
LF_NETBLOCK_INTERVAL = <span style="color: #ff0000;">&quot;86400&quot;</span>
LF_NETBLOCK_COUNT = <span style="color: #ff0000;">&quot;4&quot;</span>
LF_NETBLOCK_CLASS = <span style="color: #ff0000;">&quot;C&quot;</span>
LF_NETBLOCK_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span></pre></div></div>

<p>These settings control the permanent block and netblock blocking. You probably don&#8217;t need to touch these settings, but you might want some additional security or less security depending on your company needs. If something gets permablocked, it will require your intervention to clear it, which might create downtime for your clients. Likewise, if a legitimate IP address happens to be part of a netblock which has an attacking IP address on it, it will get blocked if you have that feature turned on. A class C network encompasses 256 IP addresses. You can set this to class B or A, but that could block thousands or millions of IP addresses, respectively. Unless you find yourself under constant attack, I would advise you to leave that LF_NETBLOCK off.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Additional Protection During Updates</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Safe Chain Update. If enabled, all dynamic update chains (GALLOW*, GDENY*,</span>
<span style="color: #666666; font-style: italic;"># SPAMHAUS, DSHIELD, BOGON, CC_ALLOW, CC_DENY, ALLOWDYN*) will create a new</span>
<span style="color: #666666; font-style: italic;"># chain when updating, and insert it into the relevant LOCALINPUT/LOCALOUTPUT</span>
<span style="color: #666666; font-style: italic;"># chain, then flush and delete the old dynamic chain and rename the new chain.</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># This prevents a small window of opportunity opening when an update occurs and</span>
<span style="color: #666666; font-style: italic;"># the dynamic chain is flushed for the new rules.</span>
SAFECHAINUPDATE = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>Activating this option will increase your system resource usage and will require more rules to be running at one time, but it provides an additional layer of protection during updates. Without this option turned on, your rules will be flushed for a short amount of time, leaving your server vulnerable.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Multi-Server Deployment Options</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_GLOBAL = <span style="color: #ff0000;">&quot;0&quot;</span>
GLOBAL_ALLOW = <span style="color: #ff0000;">&quot;&quot;</span>
GLOBAL_DENY = <span style="color: #ff0000;">&quot;&quot;</span>
GLOBAL_IGNORE = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>Like APF, you can configure global lists for multiple server deployments. You&#8217;ll need to specify a URL of the text file with the IP addresses for the global lists.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>SPAMHAUSE Blocklist</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_SPAMHAUS = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>This option enables the SPAMHAUS blocklist. Specify the number of seconds between refreshes. Recommended setting is 86400 (1 day).</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Blocking TOR Exit IP Addresses</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_TOR = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>Enabling this option will block TOR exit IP addresses. If you are not familiar with <a href="https://www.torproject.org/">TOR</a>, it is a completely anonymous proxy network. This could block some legitimate users who are trying to protect their anonymity, so I would recommend only turning this on if you are already under attack from a TOR exit address.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Blocking Bogon Addresses</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_BOGON = <span style="color: #ff0000;">&quot;0&quot;</span>
LF_BOGON_URL = <span style="color: #ff0000;">&quot;http://www.cymru.com/Documents/bogon-bn-agg.txt&quot;</span>
LF_BOGON_SKIP = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>Blocking bogon addresses (addresses that should not be possible) is usually a good decision. To enable, set the number of seconds between refreshes. I recommend enabling this option and setting the refresh at 86400 (1 day). If you do so, be sure to add your private network adapters to the skip list.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Country-Specific Access to Your Server</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">CC_DENY = <span style="color: #ff0000;">&quot;&quot;</span>
CC_ALLOW = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>With these options, you can block or allow entire countries from accessing your server. To do so, enter the country codes in a comma separated list. Even though this generates a lot of additional rules, it&#8217;s valuable to some sysadmins.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">CC_ALLOW_FILTER = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>Alternatively, you can set your server to exclusively accept traffic from a list of country codes. All other countries not listed will have their traffic dropped. There are many other settings related to these options that I don&#8217;t have time to cover in this blog.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Blocking Login Failures</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_TRIGGER = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>This enables blocking of login failures (per service). There are a lot of great customization options in this section.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Scanning Directories for Malicious Files</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_DIRWATCH = <span style="color: #ff0000;">&quot;300&quot;</span></pre></div></div>

<p>This feature scans <code>/tmp</code> and <code>/dev/shm</code> for potentially malicious files and alerts you to their presence based on the interval you designate. You can also have CSF automatically quarantine malicious files with this option:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_DIRWATCH_DISABLE = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p style="margin-bottom:0; padding-bottom:5px;"><strong>Distributed Attack Protection</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LF_DISTATTACK = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>By enabling this option, you activate additional protection against distributed attacks.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Blocking Based on Abusive Email Usage</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LT_POP3D = <span style="color: #ff0000;">&quot;0&quot;</span>
LT_IMAPD = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>If a user checks email too many times per hour (more than the non-zero value specified), the user&#8217;s IP address is blocked.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Email Alert Following Block</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">LT_EMAIL_ALERT = <span style="color: #ff0000;">&quot;1&quot;</span></pre></div></div>

<p>This will send you email when something is blocked. I&#8217;d recommend leaving it on.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Blocking IP Addresses Based on Number of Connections</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">CT_LIMIT = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>This feature tracks connections and blocks the IP if the number of connections is too high. Use caution because if you enable this option and set this value too low, it will block legitimate traffic.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Application-Level Protection</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PT_LIMIT = <span style="color: #ff0000;">&quot;60&quot;</span></pre></div></div>

<p>This feature provides application level protection against malicious scripts that take a long time to execute.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Blocking Port Scanners</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PS_INTERVAL = <span style="color: #ff0000;">&quot;300&quot;</span>
PS_LIMIT = <span style="color: #ff0000;">&quot;10&quot;</span></pre></div></div>

<p style="margin-bottom:0; padding-bottom:5px;"><strong>Enabling HTML User Interface for CSF</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">UI = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>CSF has a built-in HTML user interface. You can enable this by setting UI = &#8220;1&#8243;. There are a list of prerequisites for this option in the <code>readme.txt</code>.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Notifying Blocked IP Addresses</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">MESSENGER = <span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>This option will notify blocked IP addresses when they have been blocked by the firewall.</p>
<p style="margin-bottom:0; padding-bottom:5px;"><strong>Port Knocking</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">PORTKNOCKING = <span style="color: #ff0000;">&quot;&quot;</span></pre></div></div>

<p>CSF supports port knocking, which is a technique that provides an additional layer of security. See <a href="http://www.portknocking.org/">http://www.portknocking.org/</a> for details. </p>
<h3>Allow and Deny Lists</h3>
<p>As we walked through the CSF configuration file, you saw that I referenced the <code>csf.deny</code> file, so it should come as no surprise that CSF also includes <code>csf.allow</code> to customize &#8220;allow&#8221; rules as well. If you are familiar with APF, these files have a very similar syntax &#8230; Each entry is made up of the same four components: <code>protocol|flow|port|IP</code>. The only real difference being that APF uses the colon as a delimiter while CSF uses the pipe:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#APF Version</span>
tcp:<span style="color: #000000; font-weight: bold;">in</span>:<span style="color: #007800;">d</span>=<span style="color: #000000;">48000</span>_48020:<span style="color: #007800;">s</span>=10.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span>
&nbsp;
<span style="color: #666666; font-style: italic;">#CSF Version</span>
tcp<span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000; font-weight: bold;">in</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #007800;">d</span>=<span style="color: #000000;">48000</span>_48020<span style="color: #000000; font-weight: bold;">|</span><span style="color: #007800;">s</span>=10.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span></pre></div></div>

<p>Fortunately, replacing your colon with a pipe is a minimally invasive procedure that can be automated with a tool like vi.</p>
<h3>CSF Command Line Tool</h3>
<p>The command line tool for CSF is much more robust than the one for APF:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ csf <span style="color: #660033;">--help</span>
csf: v5.79 <span style="color: #7a0874; font-weight: bold;">&#40;</span>cPanel<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
ConfigServer Security <span style="color: #000000; font-weight: bold;">&amp;</span> Firewall
<span style="color: #7a0874; font-weight: bold;">&#40;</span>c<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000;">2006</span>-<span style="color: #000000;">2013</span>, Way to the Web Limited <span style="color: #7a0874; font-weight: bold;">&#40;</span>http:<span style="color: #000000; font-weight: bold;">//</span>www.configserver.com<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Usage: <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>csf <span style="color: #7a0874; font-weight: bold;">&#91;</span>option<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>value<span style="color: #7a0874; font-weight: bold;">&#93;</span>
&nbsp;
Option              Meaning
-h, <span style="color: #660033;">--help</span>          Show this message
-l, <span style="color: #660033;">--status</span>        List<span style="color: #000000; font-weight: bold;">/</span>Show iptables configuration
-l6, <span style="color: #660033;">--status6</span>      List<span style="color: #000000; font-weight: bold;">/</span>Show ip6tables configuration
-s, <span style="color: #660033;">--start</span>         Start firewall rules
-f, <span style="color: #660033;">--stop</span>          Flush<span style="color: #000000; font-weight: bold;">/</span>Stop firewall rules <span style="color: #7a0874; font-weight: bold;">&#40;</span>Note: lfd may restart csf<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-r, <span style="color: #660033;">--restart</span>       Restart firewall rules
-q, <span style="color: #660033;">--startq</span>        Quick restart <span style="color: #7a0874; font-weight: bold;">&#40;</span>csf restarted by lfd<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-sf, <span style="color: #660033;">--startf</span>       Force CLI restart regardless of LF_QUICKSTART setting
-a, <span style="color: #660033;">--add</span> ip        Allow an IP and add to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.allow
-ar, <span style="color: #660033;">--addrm</span> ip     Remove an IP from <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.allow and delete rule
-d, <span style="color: #660033;">--deny</span> ip       Deny an IP and add to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.deny
-dr, <span style="color: #660033;">--denyrm</span> ip    Unblock an IP and remove from <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.deny
-df, <span style="color: #660033;">--denyf</span>        Remove and unblock all entries <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.deny
-g, <span style="color: #660033;">--grep</span> ip       Search the iptables rules <span style="color: #000000; font-weight: bold;">for</span> an IP match <span style="color: #7a0874; font-weight: bold;">&#40;</span>incl. CIDR<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-t, <span style="color: #660033;">--temp</span>          Displays the current list of temp IP entries and their TTL
-tr, <span style="color: #660033;">--temprm</span> ip    Remove an IPs from the temp IP ban and allow list
-td, <span style="color: #660033;">--tempdeny</span> ip ttl <span style="color: #7a0874; font-weight: bold;">&#91;</span>-p port<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-d direction<span style="color: #7a0874; font-weight: bold;">&#93;</span>
                    Add an IP to the temp IP ban list. ttl is how long to
                    blocks <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>default:seconds, can use one suffix of h<span style="color: #000000; font-weight: bold;">/</span>m<span style="color: #000000; font-weight: bold;">/</span>d<span style="color: #7a0874; font-weight: bold;">&#41;</span>.
                    Optional port. Optional direction of block can be one of:
                    <span style="color: #000000; font-weight: bold;">in</span>, out or inout <span style="color: #7a0874; font-weight: bold;">&#40;</span>default:<span style="color: #000000; font-weight: bold;">in</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
-ta, <span style="color: #660033;">--tempallow</span> ip ttl <span style="color: #7a0874; font-weight: bold;">&#91;</span>-p port<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>-d direction<span style="color: #7a0874; font-weight: bold;">&#93;</span>
                    Add an IP to the temp IP allow list <span style="color: #7a0874; font-weight: bold;">&#40;</span>default:inout<span style="color: #7a0874; font-weight: bold;">&#41;</span>
-tf, <span style="color: #660033;">--tempf</span>        Flush all IPs from the temp IP entries
-cp, <span style="color: #660033;">--cping</span>        PING all members <span style="color: #000000; font-weight: bold;">in</span> an lfd Cluster
-cd, <span style="color: #660033;">--cdeny</span> ip     Deny an IP <span style="color: #000000; font-weight: bold;">in</span> a Cluster and add to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.deny
-ca, <span style="color: #660033;">--callow</span> ip    Allow an IP <span style="color: #000000; font-weight: bold;">in</span> a Cluster and add to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.allow
-cr, <span style="color: #660033;">--crm</span> ip       Unblock an IP <span style="color: #000000; font-weight: bold;">in</span> a Cluster and remove from <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf.deny
-cc, <span style="color: #660033;">--cconfig</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>name<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>value<span style="color: #7a0874; font-weight: bold;">&#93;</span>
                    Change configuration option <span style="color: #7a0874; font-weight: bold;">&#91;</span>name<span style="color: #7a0874; font-weight: bold;">&#93;</span> to <span style="color: #7a0874; font-weight: bold;">&#91;</span>value<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> a Cluster
-cf, <span style="color: #660033;">--cfile</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Send <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">file</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">in</span> a Cluster to <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>csf<span style="color: #000000; font-weight: bold;">/</span>
-crs, <span style="color: #660033;">--crestart</span>    Cluster restart csf and lfd
-w, <span style="color: #660033;">--watch</span> ip      Log SYN packets <span style="color: #000000; font-weight: bold;">for</span> an IP across iptables chains
-m, <span style="color: #660033;">--mail</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>addr<span style="color: #7a0874; font-weight: bold;">&#93;</span>   Display Server Check <span style="color: #000000; font-weight: bold;">in</span> HTML or email to <span style="color: #7a0874; font-weight: bold;">&#91;</span>addr<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">if</span> present
-lr, <span style="color: #660033;">--logrun</span>       Initiate Log Scanner report via lfd
-c, <span style="color: #660033;">--check</span>         Check <span style="color: #000000; font-weight: bold;">for</span> updates to csf but <span style="color: #000000; font-weight: bold;">do</span> not upgrade
-u, <span style="color: #660033;">--update</span>        Check <span style="color: #000000; font-weight: bold;">for</span> updates to csf and upgrade <span style="color: #000000; font-weight: bold;">if</span> available
<span style="color: #660033;">-uf</span>                 Force an update of csf
-x, <span style="color: #660033;">--disable</span>       Disable csf and lfd
-e, <span style="color: #660033;">--enable</span>        Enable csf and lfd <span style="color: #000000; font-weight: bold;">if</span> previously disabled
-v, <span style="color: #660033;">--version</span>       Show csf version</pre></div></div>

<p>The command line tool will also tell you if the testing mode is enabled (which is a very useful feature). If TESTING were enabled, we&#8217;d see this line at the bottom of the output:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*</span>WARNING<span style="color: #000000; font-weight: bold;">*</span> TESTING mode is enabled - <span style="color: #000000; font-weight: bold;">do</span> not forget to disable it <span style="color: #000000; font-weight: bold;">in</span> the configuration</pre></div></div>

<p>Did you make it all the way through?! Great! I know it&#8217;s a lot to take in, but it&#8217;s not terribly complicated when we break it down and understand how each piece works. Next time, I&#8217;ll be back with some tips on integrating CSF into cPanel. </p>
<p>-Mark</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2013/iptables-tips-and-tricks-csf-configuration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>iptables Tips and Tricks: APF (Advanced Policy Firewall) Configuration</title>
		<link>http://blog.softlayer.com/2013/iptables-tips-and-tricks-apf-advanced-policy-firewall-configuration/</link>
		<comments>http://blog.softlayer.com/2013/iptables-tips-and-tricks-apf-advanced-policy-firewall-configuration/#comments</comments>
		<pubDate>Tue, 29 Jan 2013 22:40:14 +0000</pubDate>
		<dc:creator>Mark Ridlen</dc:creator>
				<category><![CDATA[SoftLayer]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[allow]]></category>
		<category><![CDATA[APF]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[deny]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[traffic]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=10543</guid>
		<description><![CDATA[Let&#8217;s talk about APF. APF &#8212; Advanced Policy Firewall &#8212; is a policy-based iptables firewall system that provides simple, powerful control over your day-to-day server security. It might seem intimidating to be faced with all of the features and configuration tools in APF, but this blog should put your fears to rest. APF is an [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s talk about APF. APF &mdash; <a href="http://www.rfxn.com/projects/advanced-policy-firewall/">Advanced Policy Firewall</a> &mdash; is a policy-based iptables firewall system that provides simple, powerful control over your day-to-day server security. It might seem intimidating to be faced with all of the features and configuration tools in APF, but this blog should put your fears to rest. </p>
<p>APF is an iptables wrapper that works alongside iptables and extends its functionality. I personally don&#8217;t use iptables wrappers, but I have a lot of experience with them, and I&#8217;ve seen that they <em>do</em> offer some additional features that streamline policy management. For example, by employing APF, you&#8217;ll get several simple on/off toggles (set via configuration files) that make some complex iptables configurations available without extensive coding requirements. The flip-side of a wrapper&#8217;s simplicity is that you aren&#8217;t directly in control of the iptables commands, so if something breaks it might take longer to diagnose and repair. Before you add a wrapper like APF, be sure that you know what you are getting into. Here are a few points to consider:</p>
<ul>
<li>Make sure that what you&#8217;re looking to use adds a feature you need but cannot easily incorporate with iptables on its own.</li>
<li>You need to know how to effectively enable and disable the iptables wrapper (the correct way &#8230; read the manual!), and you should always have a trusted failsafe iptables ruleset handy in the unfortunate event that something goes horribly wrong and you need to disable the wrapper.
<li>Learn about the basic configurations and rule changes you can apply via the command line. You&#8217;ll need to understand the way your wrapper takes rules because it may differ from the way iptables handles rules.</li>
<li>You can&#8217;t manually configure your iptables rules once you have your wrapper in place (or at least you <em>shouldn&#8217;t</em>).</li>
<li>Be sure to know how to access your server via the IPMI management console so that if you completely lock yourself out beyond repair, you can get back in. You might even go so far as to have a script or set of instructions ready for tech support to run, in the event that you can&#8217;t get in via the management console.</li>
</ul>
<p><strong>TL;DR: Have a Band-Aid ready!</strong></p>
<h3>APF Configuration</h3>
<p>Now that you have been sufficiently advised about the potential challenges of using a wrapper (and you&#8217;ve got your Band-Aid ready), we can check out some of the useful APF rules that make iptables administration a lot easier. Most of the configuration for APF is in <code>conf.apf</code>. This file handles the default behavior, but not necessarily the specific blocking rules, and when we make any changes to the configuration, we&#8217;ll need to restart the APF service for the changes to take effect.</p>
<p>Let&#8217;s jump into <code>conf.apf</code> and break down what we see. The first code snippit is fairly self-explanatory. It&#8217;s another way to make sure you <a href="http://blog.softlayer.com/2012/iptables-tips-and-tricks-not-locking-yourself-out/">don&#8217;t lock yourself out</a> of your server as you are making configuration changes and testing them:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># !!! Do not leave set to (1) !!!</span>
<span style="color: #666666; font-style: italic;"># When set to enabled; 5 minute cronjob is set to stop the firewall. Set</span>
<span style="color: #666666; font-style: italic;"># this off (0) when firewall is determined to be operating as desired.</span>
<span style="color: #007800;">DEVEL_MODE</span>=<span style="color: #ff0000;">&quot;1&quot;</span></pre></div></div>

<p>The next configuration options we&#8217;ll look at are where you can make quick high-level changes if you find that legitimate traffic is being blocked and you want to make APF a little more lenient:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This controls the amount of violation hits an address must have before it</span>
<span style="color: #666666; font-style: italic;"># is blocked. It is a good idea to keep this very low to prevent evasive</span>
<span style="color: #666666; font-style: italic;"># measures. The default is 0 or 1, meaning instant block on first violation.</span>
<span style="color: #007800;">RAB_HITCOUNT</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This is the amount of time (in seconds) that an address gets blocked for if</span>
<span style="color: #666666; font-style: italic;"># a violation is triggered, the default is 300s (5 minutes).</span>
<span style="color: #007800;">RAB_TIMER</span>=<span style="color: #ff0000;">&quot;300&quot;</span>
<span style="color: #666666; font-style: italic;"># This allows RAB to 'trip' the block timer back to 0 seconds if an address</span>
<span style="color: #666666; font-style: italic;"># attempts ANY subsiquent communication while still on the inital block period.</span>
<span style="color: #007800;">RAB_TRIP</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This controls if the firewall should log all violation hits from an address.</span>
<span style="color: #666666; font-style: italic;"># The use of LOG_DROP variable set to 1 will override this to force logging.</span>
<span style="color: #007800;">RAB_LOG_HIT</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># This controls if the firewall should log all subsiqent traffic from an address</span>
<span style="color: #666666; font-style: italic;"># that is already blocked for a violation hit, this can generate allot of logs.</span>
<span style="color: #666666; font-style: italic;"># The use of LOG_DROP variable set to 1 will override this to force logging.</span>
<span style="color: #007800;">RAB_LOG_TRIP</span>=<span style="color: #ff0000;">&quot;0&quot;</span></pre></div></div>

<p>Next, we have an option to adjust ICMP flood protection. This protection should be useful against some forms of DoS attacks, and the associated rules show up in your INPUT chain:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Set a reasonable packet/time ratio for ICMP packets, exceeding this flow</span>
<span style="color: #666666; font-style: italic;"># will result in dropped ICMP packets. Supported values are in the form of:</span>
<span style="color: #666666; font-style: italic;"># pkt/s (packets/seconds), pkt/m (packets/minutes)</span>
<span style="color: #666666; font-style: italic;"># Set value to 0 for unlimited, anything above is enabled.</span>
<span style="color: #007800;">ICMP_LIM</span>=<span style="color: #ff0000;">&quot;30/s&quot;</span></pre></div></div>

<p>If you wanted to add more ports to block for p2p traffic (which will show up in the P2P chain), you&#8217;ll update this code:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># A common set of known Peer-To-Peer (p2p) protocol ports that are often</span>
<span style="color: #666666; font-style: italic;"># considered undesirable traffic on public Internet servers. These ports</span>
<span style="color: #666666; font-style: italic;"># are also often abused on web hosting servers where clients upload p2p</span>
<span style="color: #666666; font-style: italic;"># client agents for the purpose of distributing or downloading pirated media.</span>
<span style="color: #666666; font-style: italic;"># Format is comma separated for single ports and an underscore separator for</span>
<span style="color: #666666; font-style: italic;"># ranges (4660_4678).</span>
<span style="color: #007800;">BLK_P2P_PORTS</span>=<span style="color: #ff0000;">&quot;1214,2323,4660_4678,6257,6699,6346,6347,6881_6889,6346,7778&quot;</span></pre></div></div>

<p>The next few lines let you designate the ports that you want to have closed at all times. They will be blocked for INPUT and OUTPUT chains:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># These are common Internet service ports that are understood in the wild</span>
<span style="color: #666666; font-style: italic;"># services you would not want logged under normal circumstances. All ports</span>
<span style="color: #666666; font-style: italic;"># that are defined here will be implicitly dropped with no logging for</span>
<span style="color: #666666; font-style: italic;"># TCP/UDP traffic inbound or outbound. Format is comma separated for single</span>
<span style="color: #666666; font-style: italic;"># ports and an underscore separator for ranges (135_139).</span>
<span style="color: #007800;">BLK_PORTS</span>=<span style="color: #ff0000;">&quot;135_139,111,513,520,445,1433,1434,1234,1524,3127&quot;</span></pre></div></div>

<p>The next important section to look at deals with conntrack. If you get &#8220;conntrack full&#8221; errors, this is where you&#8217;d increase the allowed connections. It&#8217;s not uncommon to need more connections than the default, so if you need to adjust that value, you&#8217;d do it here:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This is the maximum number of &quot;sessions&quot; (connection tracking entries) that</span>
<span style="color: #666666; font-style: italic;"># can be handled simultaneously by the firewall in kernel memory. Increasing</span>
<span style="color: #666666; font-style: italic;"># this value too high will simply waste memory - setting it too low may result</span>
<span style="color: #666666; font-style: italic;"># in some or all connections being refused, in particular during denial of</span>
<span style="color: #666666; font-style: italic;"># service attacks.</span>
<span style="color: #007800;">SYSCTL_CONNTRACK</span>=<span style="color: #ff0000;">&quot;65536&quot;</span></pre></div></div>

<p>We&#8217;ve talked about the ports we want closed at all times, so it only makes sense that we&#8217;d specify which ports we want open for all interfaces:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Common inbound (ingress) TCP ports</span>
<span style="color: #007800;">IG_TCP_CPORTS</span>=<span style="color: #ff0000;">&quot;22&quot;</span>
<span style="color: #666666; font-style: italic;"># Common inbound (ingress) UDP ports</span>
<span style="color: #007800;">IG_UDP_CPORTS</span>=<span style="color: #ff0000;">&quot;&quot;</span>
<span style="color: #666666; font-style: italic;"># Common outbound (egress) TCP ports</span>
<span style="color: #007800;">EG_TCP_CPORTS</span>=<span style="color: #ff0000;">&quot;21,25,80,443,43&quot;</span>
<span style="color: #666666; font-style: italic;"># Common outbound (egress) UDP ports</span>
<span style="color: #007800;">EG_UDP_CPORTS</span>=<span style="color: #ff0000;">&quot;20,21,53&quot;</span></pre></div></div>

<p>And when we want a special port allowance for specific users, we can declare it easily. For example, if we want port 22 open for user ID 0, we&#8217;d use this code:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Allow outbound access to destination port 22 for uid 0</span>
<span style="color: #007800;">EG_TCP_UID</span>=<span style="color: #ff0000;">&quot;0:22&quot;</span></pre></div></div>

<p>The next few sections on <code>Remote Rule Imports</code> and <code>Global Trust</code> are a little more specialized, and I encourage you to read a little more about them (since there&#8217;s so much to them and not enough space to cover them here on the blog). An important feature of APF is that it imports block lists from outside sources to keep you safe from some attackers, so the <code>Remote Rule Imports</code> can prove to be very useful. The <code>Global Trust</code> section is incredibly useful for multi-server deployments of APF. Here, you can set up your global allow/block lists and have them all pull from a central location so that you can make a single update to the source and have the update propogated to all servers in your configuration. These changes are synced to the <code>glob_allow/deny.rules</code> files, and they will be downloaded (and overwritten) on a regular basis from your specified source, so don&#8217;t make any manual edits in <code>glob_allow/deny.rules</code>.</p>
<p>As you can see, <code>apf.conf</code> is no joke. It has a lot of stuff going on, but it&#8217;s very straightforward and documented well. Once we&#8217;ve set up apf.conf with the configurations we need, it&#8217;s time to look at the more focused <code>allow_hosts.rules</code> and <code>deny_hosts.rules</code> files. These <code>.rules</code> files are where where you put your typical firewall rules in place. If there&#8217;s one piece of advice I can give you about these configurations, it would be to check if your traffic is already allowed or blocked. Having multiple rules that do the same thing (possibly in different places) is confusing and potentially dangerous. </p>
<p>The <code>deny_hosts.rules</code> configuration will look just like <code>allow_hosts.rules</code>, but it&#8217;s performing the opposite function. Let&#8217;s check out an <code>allow_hosts.rules</code> configuration that will allow the Nimsoft service to function:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">tcp:<span style="color: #000000; font-weight: bold;">in</span>:<span style="color: #007800;">d</span>=<span style="color: #000000;">48000</span>_48020:<span style="color: #007800;">s</span>=10.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span>
tcp:out:<span style="color: #007800;">d</span>=<span style="color: #000000;">48000</span>_48020:<span style="color: #007800;">d</span>=10.0.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">8</span></pre></div></div>

<p>The format is somewhat simplistic, but the file gives a little more context in the comments:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># The trust rules can be made in advanced format with 4 options</span>
<span style="color: #666666; font-style: italic;"># (proto:flow:port:ip);</span>
<span style="color: #666666; font-style: italic;"># 1) protocol: [packet protocol tcp/udp]</span>
<span style="color: #666666; font-style: italic;"># 2) flow in/out: [packet direction, inbound or outbound]</span>
<span style="color: #666666; font-style: italic;"># 3) s/d=port: [packet source or destination port]</span>
<span style="color: #666666; font-style: italic;"># 4) s/d=ip(/xx) [packet source or destination address, masking supported]</span>
<span style="color: #666666; font-style: italic;"># Syntax:</span>
<span style="color: #666666; font-style: italic;"># proto:flow:[s/d]=port:[s/d]=ip(/mask)</span></pre></div></div>

<p>APF also uses <code>ds_hosts.rules</code> to load the DShield.org blocklist, and I assume the <code>ecnshame_hosts.rules</code> does something similar (can&#8217;t find much information about it), so you won&#8217;t need to edit these files manually. Additionally, you probably don&#8217;t need to make any changes to <code>log.rules</code>, unless you want to make changes to what exactly you log. As it stands, it logs certain dropped connections, which should be enough. Also, it might be worth noting that this file is a script, not a configuration file.</p>
<p>The last two configuration files are the <code>preroute.rules</code> and <code>postroute.rules</code> that (unsurprisingly) are used to make routing changes. If you have been following my articles, this corresponds to the <a href="http://blog.softlayer.com/2011/iptables-tips-and-tricks-port-redirection/">iptables chains for PREROUTING and POSTROUTING</a> where you would do things like port forwarding and other advanced configuration that you probably don&#8217;t want to do in most cases.</p>
<h3>APF Command Line Management</h3>
<p>As I mentioned in the &#8220;points to consider&#8221; at the top of this post, it&#8217;s important to learn the changes you can perform from the command line, and APF has some very useful command line tools:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>server<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #666666; font-style: italic;"># apf --help</span>
APF version <span style="color: #000000;">9.7</span> <span style="color: #000000; font-weight: bold;">&lt;</span>apf<span style="color: #000000; font-weight: bold;">@</span>r-fx.org<span style="color: #000000; font-weight: bold;">&gt;</span>
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>C<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">2002</span>-<span style="color: #000000;">2011</span>, R-fx Networks <span style="color: #000000; font-weight: bold;">&lt;</span>proj<span style="color: #000000; font-weight: bold;">@</span>r-fx.org<span style="color: #000000; font-weight: bold;">&gt;</span>
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>C<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">2011</span>, Ryan MacDonald <span style="color: #000000; font-weight: bold;">&lt;</span>ryan<span style="color: #000000; font-weight: bold;">@</span>r-fx.org<span style="color: #000000; font-weight: bold;">&gt;</span>
This program may be freely redistributed under the terms of the GNU GPL
&nbsp;
usage <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apf <span style="color: #7a0874; font-weight: bold;">&#91;</span>OPTION<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #660033;">-s</span><span style="color: #000000; font-weight: bold;">|</span>--start ......................... load all firewall rules
<span style="color: #660033;">-r</span><span style="color: #000000; font-weight: bold;">|</span>--restart ....................... stop <span style="color: #7a0874; font-weight: bold;">&#40;</span>flush<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&amp;</span> reload firewall rules
<span style="color: #660033;">-f</span><span style="color: #000000; font-weight: bold;">|</span>--stop........ .................. stop <span style="color: #7a0874; font-weight: bold;">&#40;</span>flush<span style="color: #7a0874; font-weight: bold;">&#41;</span> all firewall rules
<span style="color: #660033;">-l</span><span style="color: #000000; font-weight: bold;">|</span>--list .......................... list all firewall rules
<span style="color: #660033;">-t</span><span style="color: #000000; font-weight: bold;">|</span>--status ........................ output firewall status log
<span style="color: #660033;">-e</span><span style="color: #000000; font-weight: bold;">|</span>--refresh ....................... refresh <span style="color: #000000; font-weight: bold;">&amp;</span> resolve dns names <span style="color: #000000; font-weight: bold;">in</span> trust rules
<span style="color: #660033;">-a</span> HOST CMT<span style="color: #000000; font-weight: bold;">|</span>--allow HOST COMMENT ... add host <span style="color: #7a0874; font-weight: bold;">&#40;</span>IP<span style="color: #000000; font-weight: bold;">/</span>FQDN<span style="color: #7a0874; font-weight: bold;">&#41;</span> to allow_hosts.rules and
                                     immediately load new rule into firewall
<span style="color: #660033;">-d</span> HOST CMT<span style="color: #000000; font-weight: bold;">|</span>--deny HOST COMMENT .... add host <span style="color: #7a0874; font-weight: bold;">&#40;</span>IP<span style="color: #000000; font-weight: bold;">/</span>FQDN<span style="color: #7a0874; font-weight: bold;">&#41;</span> to deny_hosts.rules and
                                     immediately load new rule into firewall
<span style="color: #660033;">-u</span><span style="color: #000000; font-weight: bold;">|</span>--remove HOST ................... remove host from <span style="color: #7a0874; font-weight: bold;">&#91;</span>glob<span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #000000; font-weight: bold;">*</span>_hosts.rules
                                     and immediately remove rule from firewall
<span style="color: #660033;">-o</span><span style="color: #000000; font-weight: bold;">|</span>--ovars ......................... output all configuration options</pre></div></div>

<p>You can use these command line tools to turn your firewall on and off, add allowed or blocked hosts and display troubleshooting information. These commands are very easy to use, but if you want more fine-tuned control, you&#8217;ll need to edit the configuration files directly (as we looked at above).</p>
<p>I know it seems like a lot of information, but to a large extent, that&#8217;s all you need to know to get started with APF. Take each section slowly and understand what each configuration file is doing, and you&#8217;ll master APF in no time at all.</p>
<p>-Mark</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2013/iptables-tips-and-tricks-apf-advanced-policy-firewall-configuration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Risk Management: Event Logging to Protect Your Systems</title>
		<link>http://blog.softlayer.com/2012/risk-management-event-logging-to-protect-your-systems/</link>
		<comments>http://blog.softlayer.com/2012/risk-management-event-logging-to-protect-your-systems/#comments</comments>
		<pubDate>Sun, 30 Dec 2012 19:10:59 +0000</pubDate>
		<dc:creator>Matthew Herring</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[attacks]]></category>
		<category><![CDATA[event logs]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[log management]]></category>
		<category><![CDATA[Logging]]></category>
		<category><![CDATA[risk]]></category>
		<category><![CDATA[risk assessment]]></category>
		<category><![CDATA[risk management]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SoftLayer]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=10313</guid>
		<description><![CDATA[The calls start rolling in at 2am on Sunday morning. Alerts start firing off. Your livelihood is in grave danger. It doesn&#8217;t come with the fanfare of a blockbuster Hollywood thriller, but if a server hosting your critical business infrastructure is attacked, becomes compromised or fails, it might feel like the end of the world. [...]]]></description>
			<content:encoded><![CDATA[<p>The calls start rolling in at 2am on Sunday morning. Alerts start firing off. Your livelihood is in grave danger. It doesn&#8217;t come with the fanfare of a blockbuster Hollywood thriller, but if a server hosting your critical business infrastructure is attacked, becomes compromised or fails, it might feel like the end of the world. In our <a href="http://blog.softlayer.com/2012/an-introduction-to-risk-management/">Risk Management</a> series, and we&#8217;ve covered the basics of <a href="http://blog.softlayer.com/2012/risk-management-securing-your-servers/">securing your servers</a>, so the next consideration we need to make is for when our security is circumvented.</p>
<p>It seems silly to prepare for a failure in a security plan we spend time and effort creating, but if we stick our heads in the sand and tell ourselves that we&#8217;re secure, we won&#8217;t be prepared in the unlikely event of something happening. Every attempt to mitigate risks and stop threats in their tracks will be circumvented by the one failure, threat or disaster you didn&#8217;t cover in your risk management plan. When that happens, accurate event logging will help you record what happened, respond to the event (if it&#8217;s still in progress) and have the information available to properly safeguard against or prevent similar threats in the future.</p>
<p>Like any other facet of security, &#8220;event logging&#8221; can seem overwhelming and unforgiving if you&#8217;re looking at hundreds of types of events to log, each with dozens of variations and options. Like we did when we looked at securing servers, let&#8217;s focus our attention on a few key areas and build out what we need:</p>
<p><strong>Which events should you log?</strong><br />
Look at your risk assessment and determine which systems are of the highest value or could cause the most trouble if interrupted. Those systems are likely to be what you prioritized when securing your servers, and they should also take precedence when it comes to event logging. You probably don&#8217;t have unlimited compute and storage resources, so you have to determine which types of events are most valuable for you and how long you should keep records of them &mdash; it&#8217;s critical to have your event logs on-hand when you need them, so logs should be retained online for a period of time and then backed up offline to be available for another period of time.</p>
<p>Your goal is to understand what&#8217;s happening on your servers and why it&#8217;s happening so you know how to respond. The most common audit-able events include successful and unsuccessful account log-on events, account management events, object access, policy change, privilege functions, process tracking and system events. The most conservative approach actually involves logging <em>more</em> information/events and keeping those logs for longer than you think you need. From there, you can evaluate your logs periodically to determine if the level of auditing/logging needs to be adjusted. </p>
<p><strong>Where do you store the event logs?</strong><br />
Your event logs won&#8217;t do you any good if they are stored in a space that is insufficient for the amount of data you need to collect. I recommend centralizing your logs in a secure environment that is both readily available and scalable. In addition to the logs being accessible when the server(s) they are logging are inaccessible, aggregating and organize your logs in a central location can be a powerful tool to build reports and analyze trends. With that information, you&#8217;ll be able to more clearly see deviations from normal activity to catch attacks (or attempted attacks) in progress.</p>
<p><strong>How do you protect your event logs?</strong><br />
Attacks can come from both inside and out. To avoid intentional malicious activity by insiders, separation of duties should be enforced when planning logging. Learn from The X Files and &#8220;Trust no one.&#8221; Someone who has been granted the &#8216;keys to your castle&#8217; shouldn&#8217;t also be able to disable the castle&#8217;s security system or mess with the castle&#8217;s logs. Your network engineer shouldn&#8217;t have exclusive access to your router logs, and your sysadmin shouldn&#8217;t be the only one looking at your web server logs. </p>
<p><strong>Keep consistent time.</strong><br />
Make sure all of your servers are using the same accurate time source. That way, all logs generated from those servers will share consistent time-stamps. Trying to diagnose an attack or incident is exceptionally more difficult if your web server&#8217;s clock isn&#8217;t synced with your database server&#8217;s clock or if they&#8217;re set to different time zones. You&#8217;re putting a lot of time and effort into logging events, so you&#8217;re shooting yourself in the foot if events across all of your servers don&#8217;t line up cleanly.</p>
<p><strong>Read your logs!</strong><br />
Logs won&#8217;t do you any good if you&#8217;re not looking at them. Know the red flags to look for in each of your logs, and set aside time to look for those flags regularly. Several SoftLayer customers &mdash; like Tech Partner <a href="https://papertrailapp.com/">Papertrail</a> &mdash; have come up with innovative and effective log management platforms that streamline the process of aggregating, searching and analyzing log files.</p>
<p>It&#8217;s important to reiterate that logging &mdash; like any other security endeavor &mdash; is not a &#8216;one size fits all&#8217; model, but that shouldn&#8217;t discourage you from getting started. If you aren&#8217;t logging or you aren&#8217;t actively monitoring your logs, any step you take is a step forward, and each step is worth the effort.</p>
<p>Thanks for reading, and stay secure, my friends!</p>
<p>-Matthew </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/risk-management-event-logging-to-protect-your-systems/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Risk Management: Securing Your Servers</title>
		<link>http://blog.softlayer.com/2012/risk-management-securing-your-servers/</link>
		<comments>http://blog.softlayer.com/2012/risk-management-securing-your-servers/#comments</comments>
		<pubDate>Wed, 14 Nov 2012 22:40:53 +0000</pubDate>
		<dc:creator>Matthew Herring</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[alerts]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[corporate]]></category>
		<category><![CDATA[corporate infrastructure]]></category>
		<category><![CDATA[employees]]></category>
		<category><![CDATA[identification]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[security model]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=9461</guid>
		<description><![CDATA[How do you secure your home when you leave? If you&#8217;re like most people, you make sure to lock the door you leave from, and you head off to your destination. If Phil is right about &#8220;locks keeping honest people honest,&#8221; simply locking your front door may not be enough. When my family moved into [...]]]></description>
			<content:encoded><![CDATA[<p>How do you secure your home when you leave? If you&#8217;re like most people, you make sure to lock the door you leave from, and you head off to your destination. If Phil is right about &#8220;<a href="http://blog.softlayer.com/2012/creating-a-usable-memorable-and-secure-password/">locks keeping honest people honest</a>,&#8221; simply locking your front door may not be enough. When my family moved into a new house recently, we evaluated its physical security and tried to determine possible avenues of attack (garage, doors, windows, etc.), tools that could be used (a stolen key, a brick, a crowbar, etc.) and ways to mitigate the risk of each kind of attack &#8230; We were effectively creating a <a href="http://blog.softlayer.com/2012/an-introduction-to-risk-management/">risk management</a> plan.</p>
<p>Every risk has different probabilities of occurrence, potential damages, and prevention costs, and the risk management process helps us balance the costs and benefits of various security methods. When it comes to securing a home, the most effective protection comes by using layers of different methods &#8230; To prevent a home invasion, you might lock your door, train your dog to make intruders into chew toys and have an alarm system installed. Even if an attacker can get a key to the house and bring some leftover steaks to appease the dog, the motion detectors for the alarm are going to have the police on their way quickly. (Or you could violate every HOA regulation known to man by digging a moat around the house, filling with sharks with laser beams attached to their heads, and building a medieval drawbridge over the moat.)  </p>
<p>I use the example of securing a house because it&#8217;s usually a little more accessible than talking about &#8220;server security.&#8221; Server security doesn&#8217;t have to be overly complex or difficult to implement, but its stigma of complexity usually prevents systems administrators from incorporating even the simplest of security measures. Let&#8217;s take a look at the easiest steps to begin securing your servers in the context of their home security parallels, and you&#8217;ll see what I&#8217;m talking about.</p>
<p><strong>Keep &#8220;Bad People&#8221; Out:</strong> Have secure password requirements.</p>
<p>Passwords are your keys and your locks &mdash; the controls you put into place that ensure that only the people who should have access get it.  There&#8217;s no &#8220;catch all&#8221; method of keeping the bad people out of your systems, but employing a variety of authentication and identification measures can greatly enhance the security of your systems. A first line of defense for server security would be to set password complexity and minimum/maximum password age requirements.</p>
<p>If you want to add an additional layer of security at the authentication level, you can incorporate &#8220;Strong&#8221; or <a href="http://blog.softlayer.com/2011/the-pros-and-cons-of-two-factor-authentication/">&#8220;Two-Factor&#8221; authentication</a>. From there, you can learn about a dizzying array of authentication protocols (like TACACS+ and RADIUS) to centralize access control or you can use active directory groups to simplify the process of granting and/or restricting access to your systems. Each layer of authentication security has benefits and drawbacks, and most often, you&#8217;ll want to weigh the security risk against your need for ease-of-use and availability as you plan your implementation.</p>
<p><strong>Stay Current on your &#8220;Good People&#8221;:</strong> When authorized users leave, make sure their access to your system leaves with them.</p>
<p>If your neighbor doesn&#8217;t return borrowed tools to your tool shed after you gave him a key when he was finishing his renovation, you need to take his key back when you tell him he can&#8217;t borrow any more. If you don&#8217;t, nothing is stopping him from walking over to the shed when you&#8217;re not looking and taking more (all?) of your tools. I know it seems like a silly example, but that kind of thing is a big oversight when it comes to server security.</p>
<p>Employees are granted access to perform their duties (the <a href="http://en.wikipedia.org/wiki/Principle_of_least_privilege">principle of least privilege</a>), and when they no longer require access, the &#8220;keys to the castle&#8221; should be revoked. Auditing who has access to what (whether it be for your systems or for your applications) should be continual.</p>
<p>You might have processes in place to grant and remove access, but it&#8217;s also important to audit those privileges regularly to catch any breakdowns or oversights. The last thing you want is to have a disgruntled former employee wreak all sorts of havoc on your key systems, sell proprietary information or otherwise cost you revenue, fines, recovery efforts or lost reputation.</p>
<p><strong>Catch Attackers:</strong> Monitor your systems closely and set up alerts if an intrusion is detected.</p>
<p>There is always a chance that bad people are going to keep looking for a way to get into your house. Maybe they&#8217;ll walk around the house to try and open the doors and windows you don&#8217;t use very often. Maybe they&#8217;ll ring the doorbell and if no lights turn on, they&#8217;ll break a window and get in that way.</p>
<p>You can never completely eliminate all risk. Security is a continual process, and eventually some determined, over-caffeinated hacker is going to find a way in. Thinking your security is impenetrable makes you vulnerable if by some stretch of the imagination, an attacker breaches your security (see: <a href="http://en.wikipedia.org/wiki/Trojan_Horse">Trojan Horse</a>). Continuous monitoring strategies can alert administrators if someone does things they shouldn&#8217;t be doing. Think of it as a motion detector in your house &#8230; &#8220;If someone gets in, I want to know where they are.&#8221; When you implement monitoring, logging and alerting, you will also be able to recover more quickly from security breaches because every file accessed will be documented.</p>
<p><strong>Minimize the Damage:</strong> Lock down your system if it is breached. </p>
<p>A burglar smashes through your living room window, runs directly to your DVD collection, and takes your limited edition &#8220;Saved by the Bell&#8221; series box set. What can you do to prevent them from running back into the house to get the autographed posted of Alf off of your wall?</p>
<p>When you&#8217;re monitoring your servers and you get alerted to malicious activity, you&#8217;re already late to the game &#8230; The damage has already started, and you need to minimize it. In a home security environment, that might involve an ear-piercing alarm or filling the moat around your house even higher so the sharks get a better angle to aim their laser beams. File integrity monitors and IDS software can mitigate damage in a security breach by reverting files when checksums don&#8217;t match or stopping malicious behavior in its tracks.</p>
<p>These recommendations are only a few of the first-line layers of defense when it comes to server security. Even if you&#8217;re only able to incorporate one or two of these tips into your environment, you should. When you look at server security in terms of a journey rather than a destination, you can celebrate the progress you make and look forward to the next steps down the road.</p>
<p>Now if you&#8217;ll excuse me, I have to go to a meeting where I&#8217;m proposing moats, drawbridges, and sharks with laser beams on their heads to <a href="http://blog.softlayer.com/author/samf/">SamF</a> for data center security &#8230; Wish me luck!</p>
<p>-Matthew</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/risk-management-securing-your-servers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Trouble with Open DNS Resolvers</title>
		<link>http://blog.softlayer.com/2012/the-trouble-with-open-dns-resolvers/</link>
		<comments>http://blog.softlayer.com/2012/the-trouble-with-open-dns-resolvers/#comments</comments>
		<pubDate>Fri, 02 Nov 2012 16:30:55 +0000</pubDate>
		<dc:creator>Ryan Carter</dc:creator>
				<category><![CDATA[SoftLayer]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[abuse]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[amplification]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[DDoS]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[DNS resolvers]]></category>
		<category><![CDATA[network providers]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open resolvers]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=9642</guid>
		<description><![CDATA[In the last couple of days, there&#8217;s been a bit of buzz about &#8220;open DNS resolvers&#8221; and DNS amplification DDoS attacks, and SoftLayer&#8217;s name has been brought up a few times. In a blog post on October 30, CloudFlare explained DNS Amplification DDoS attacks and reported the geographic and network sources of open DNS resolvers [...]]]></description>
			<content:encoded><![CDATA[<p>In the last couple of days, there&#8217;s been a bit of buzz about &#8220;open DNS resolvers&#8221; and DNS amplification DDoS attacks, and SoftLayer&#8217;s name has been brought up a few times. In a blog post on October 30, CloudFlare <a href="http://blog.cloudflare.com/deep-inside-a-dns-amplification-ddos-attack">explained DNS Amplification DDoS attacks</a> and reported the geographic and network sources of open DNS resolvers that were contributing to a 20Gbps attack on their network. SoftLayer&#8217;s AS numbers (SOFTLAYER and the legacy THEPLANET-AS number) show up on the top ten &#8220;worst offenders&#8221; list, and Dan Goodin contacted us to get a comment for a follow-up piece on Ars Technica &mdash; <a href="http://arstechnica.com/security/2012/10/meet-the-network-operators-helping-fuel-the-spike-in-big-ddos-attacks/">Meet the network operators helping to fuel the spike in big DDoS attacks</a>.</p>
<p>While the content of that article is less sensationalized than the title, there are still a few gaps to fill about when it comes to how SoftLayer is actually involved in the big picture (*SPOILER ALERT* We aren&#8217;t &#8220;helping to fuel the spike in big DDoS attacks&#8221;). The CloudFlare blog and the Ars Technica post presuppose that the presence of open recursive DNS resolvers is a sign of negligence on the part of the network provider at best and maliciousness at worst, and that&#8217;s not the case.</p>
<p>The majority of SoftLayer&#8217;s infrastructure is made up of self-managed dedicated and cloud servers. Customers who rent those servers on a monthly basis have unrestricted access to operate their servers in any way they&#8217;d like as long as that activity meets our acceptable use policy. Some of our largest customers are hosting resellers who provide that control to their customers who can then provide that control to their own customers. And if 23 million hostnames reside on the SoftLayer network, you can bet that we&#8217;ve got a lot of users hosting their DNS on SoftLayer infrastructure. Unfortunately, it&#8217;s easier for those customers and customers-of-customers and customers-of-customers-of-customers to use &#8220;defaults&#8221; instead of looking for, learning and implementing &#8220;best practices.&#8221;</p>
<p>It&#8217;s all too common to find those DNS resolvers open and ultimately vulnerable to DNS amplification attacks, and whenever our team is alerted to that vulnerability on our network, we make our customers aware of it. In turn, they may pass the word down the customer-of-customer chain to get to the DNS owner. It&#8217;s usually not a philosophical question about whether DNS resolvers should be open for the greater good of the Internet &#8230; It&#8217;s a question of whether the DNS owner has any idea that their &#8220;configuration&#8221; is vulnerable to be abused in this way.</p>
<p>SoftLayer&#8217;s network operations, abuse and support teams have tools that flag irregular and potentially abusive traffic coming from any server on our network, and we take immediate action when we find a problem or are alerted to one by someone who sends details to <a href="mailto:abuse@softlayer.com">abuse@softlayer.com</a>. The challenge we run into is that flagging obvious abusive behavior from an active DNS server is a bit of a cat-and-mouse game &#8230; Attackers cloak their activity in normal traffic. Instead of sending a huge amount of traffic from a single domain, they send a marginal amount of traffic from a large number of machines, and the &#8220;abusive&#8221; traffic is nearly impossible for even the DNS owner to differentiate from &#8220;regular&#8221; traffic.</p>
<p>CloudFlare effectively became a <a href="http://en.wikipedia.org/wiki/Honeypot_%28computing%29">honeypot</a>, and they caught a distributed DNS amplification DoS attack. The results they gathered are extremely valuable to teams like mine at SoftLayer, so if they go the next step to actively contact the abuse channel for each of the network providers in their list, I hope that each of the other providers will jump on that information as I know my team will.</p>
<p>If you have a DNS server on the SoftLayer network, and you&#8217;re not sure whether it&#8217;s configured to prevent it from being used for these types of attacks, our support team is happy to help you out. For those of you interested in doing a little DNS homework to learn more, Google&#8217;s Developer Network has an awesome overview of <a href="https://developers.google.com/speed/public-dns/docs/security">DNS security threats and mitigations</a> which gives an overview of potential attacks and preventative measures you can take. If you&#8217;re just looking for an easy way to close an open recursor, scroll to the bottom of <a href="http://blog.cloudflare.com/deep-inside-a-dns-amplification-ddos-attack">CloudFlare&#8217;s post</a>, and follow their quick guide.</p>
<p>If, on the other hand, you have your own DNS server and you don&#8217;t want to worry about all of this configuration or administration, SoftLayer operates private DNS resolvers that are limited to our announced IP space. Feel free to use ours instead!</p>
<p>-Ryan</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/the-trouble-with-open-dns-resolvers/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Tips from the Abuse Department: Know Spam. Stop Spam.</title>
		<link>http://blog.softlayer.com/2012/tips-from-the-abuse-department-know-spam-stop-spam/</link>
		<comments>http://blog.softlayer.com/2012/tips-from-the-abuse-department-know-spam-stop-spam/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 14:30:34 +0000</pubDate>
		<dc:creator>Andrew Smith - Martinez</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[abuse]]></category>
		<category><![CDATA[botnet]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[prevention]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[secure servers]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[SPAM]]></category>
		<category><![CDATA[spamming]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[upload mailers]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=9474</guid>
		<description><![CDATA[As an abuse administrator, I&#8217;m surrounded by spam on a daily basis. When someone sends an abuse-related complaint to our abuse@softlayer.com contact address, it gets added to our ticket queue, and our Abuse SLayers take time to investigate and follow up with the customers whose servers violate our acceptable use policy. The majority of those [...]]]></description>
			<content:encoded><![CDATA[<p>As an abuse administrator, I&#8217;m surrounded by spam on a daily basis. When someone sends an abuse-related complaint to our <a href="mailto:abuse@softlayer.com">abuse@softlayer.com</a> contact address, it gets added to our ticket queue, and our Abuse SLayers take time to investigate and follow up with the customers whose servers violate our acceptable use policy. The majority of those abuse-related submissions are reporting spam coming from our network, and in my interaction with customers, I&#8217;ve noticed that spam (and the source of spam) is widely misunderstood.</p>
<p>Most spam tickets we create on customer accounts pinpoint spam sent from a compromised or exploited server. Our direct customer didn&#8217;t send the phishing email, malware distribution, pharmacy advertisement or pornographic spam, but that activity came from their account. While they&#8217;re accountable for the abusive behavior coming from their server, in many cases, they don&#8217;t know that there&#8217;s a problem until we post an abuse ticket on their account. These servers are targeted and compromised by common techniques and exploits that could have been easily avoided, but they aren&#8217;t very well known outside the world of abuse.</p>
<p>To protect yourself from a spammer, you need to think like a spammer. You need to understand how someone might try to exploit your environment so that you can prevent them from doing so. As you&#8217;re looking at ways to secure your server proactively, make sure you target these five exploits in particular:</p>
<p style="margin-bottom:0; padding-bottom:0;"><strong>1. User Auth Login</strong></p>
<p style="margin-top:5px; padding-top:0;">This is by far the most common exploit to used to send spam. This method involves a person or script using the credentials of a user to send spam through a domain&#8217;s mail server. The majority of these incidences are caused by malware on a client PC that obtains the login and password for a domain user and uses that information to log on and send mail from the client PC through the server. Often, these spam messages are sent through a botnet command structure.</p>
<p>When an account is compromised, simply changing the password for the compromised user on the server usually won&#8217;t stop the abuse. We see quite a few accounts that continue to send spam after an initial abuse ticket results in a password change. Most servers that are sending spam with this method are found to only be sending a small amount of spam at any given time to avoid detection. The low volume of spam that is being sent per server is made up for by the fact that there are thousands of servers being used for the same spamming campaigns. </p>
<p>In order to stop the User Auth Login exploit, a customer needs to clean all of the malicious software (malware) from their environments. To prevent future User Auth Login compromises, users should be made aware of the potential dangers of untrusted software, and if they believe their machines are infected, they need to know what to do.</p>
<p style="margin:0; padding:0;"><strong>2. Tell-a-friend Exploitation</strong></p>
<p style="margin-top:5px; padding-top:0;">The User Auth Login technique is the most common method employed by spammers, but the &#8220;tell-a-friend&#8221; script exploitation isn&#8217;t far behind when it comes to volume of affected servers. This spamming method find websites that use scripts to invite users to refer friends to a page or product. Spammers will use the &#8216;Your Message&#8217; field in one of these scripts to input their own content and links, and they&#8217;ll push the actual page referral link to the bottom of the message. When these site scripts aren&#8217;t secure, the spammer will use them to send hundreds or thousands of messages.</p>
<p>To avoid having your website fall victim to this type of spam, be very wary of any widget or script you add. If you need to add Facebook, Twitter and email &#8220;share&#8221; functionality to your site, make sure you incorporate a tell-a-friend script that does not allow for customizable messages or does not accept input of more than one email address. Also, users won&#8217;t need the &#8220;cc&#8221; or &#8220;bcc&#8221; fields, so you can be sure those are axed as well. If you can&#8217;t find a good &#8220;share&#8221; script that you&#8217;re comfortable with from a security perspective, it might be a good idea to remove that functionality to avoid exploitation.</p>
<p style="margin:0; padding:0;"><strong>3. Uploaded Mailers</strong></p>
<p style="margin-top:5px; padding-top:0;">Spam sent via an uploaded third party mailer can sometimes prove difficult for admins to locate. An uploaded third party mailer could be capable of creating it&#8217;s own outbound SMTP connection, and that would allow a program to bypass the existing MTA on the server and render any legitimate mail logs useless for investigation. Another challenge is that a php mailer can be uploaded to a location within a user&#8217;s web content, and that mailer is run by the user &#8216;nobody&#8217; (the default Apache user).</p>
<p>We strongly suggest configuring your server to have the mail headers show the script&#8217;s user (that&#8217;s not the Apache default user) and the location the script is running from on the server. Many times, these kinds of mailers are maliciously uploaded after a user&#8217;s FTP password is been compromised, so be sure your FTP login information is secure.</p>
<p style="margin-bottom:0; padding-bottom:0;"><strong>4. Software Exploits</strong></p>
<p style="margin-top:5px; padding-top:0;">The &#8220;software exploits&#8221; category casts a huge shadow. Every piece of software on a server &mdash; from mail servers, content management systems and control panels to the operating system itself &mdash; can be targeted by hackers. They probe servers to find security vulnerabilities and weak coding, and when they find a vulnerability, they take control.</p>
<p>The hacker who found the software vulnerability might not actually take advantage of the exploit immediately. That user may sell access to other entities for their use, and that use often ends up being spam. In addition to having strong firewall rules and access restrictions, you should update and maintain the current stable versions of all software on your servers.</p>
<p style="margin-bottom:0; padding-bottom:0;"><strong>5. WordPress Exploits</strong></p>
<p style="margin-top:5px; padding-top:0;">WordPress exploits would technically fall under the &#8220;Software Exploits&#8221; category, but I&#8217;m breaking it out into its own category simply due to the volume of spam issues that are the result of exploiting this particular piece of software. The first step to protecting against spam being sent through this source is to make sure you have the latest version of WordPress installed. With that done, be sure to research the latest security plugins for that version and install any that are applicable to your environment.</p>
<p>These five techniques are not the only ones used by spammers to take advantage of your environment, but they are some of the most common. To protect yourself from becoming a source of spam, make your servers a more difficult target to exploit. To stop spam, you need to know spam. Now that you know spam, it&#8217;s time to stop it. Ask questions, test your environment regularly and watch your logs for any unexplained usage.</p>
<p>-Andrew</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/tips-from-the-abuse-department-know-spam-stop-spam/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>An Introduction to Risk Management</title>
		<link>http://blog.softlayer.com/2012/an-introduction-to-risk-management/</link>
		<comments>http://blog.softlayer.com/2012/an-introduction-to-risk-management/#comments</comments>
		<pubDate>Tue, 16 Oct 2012 19:30:42 +0000</pubDate>
		<dc:creator>Matthew Herring</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[compliance]]></category>
		<category><![CDATA[COPA]]></category>
		<category><![CDATA[data protection]]></category>
		<category><![CDATA[FCRA]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[HIPAA]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[risk]]></category>
		<category><![CDATA[risk management]]></category>
		<category><![CDATA[Sarbanes-Oxley]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=9458</guid>
		<description><![CDATA[Whether you&#8217;re managing a SaaS solution for thousands of large clients around the world or you&#8217;re running a small mail server for a few mom-and-pop businesses in your neighborhood, you&#8217;re providing IT service for a fee &#8212; and your customers expect you to deliver. It&#8217;s easy to get caught up in focusing your attention and [...]]]></description>
			<content:encoded><![CDATA[<p>Whether you&#8217;re managing a SaaS solution for thousands of large clients around the world or you&#8217;re running a small mail server for a few mom-and-pop businesses in your neighborhood, you&#8217;re providing IT service for a fee &mdash; and your customers expect you to deliver. It&#8217;s easy to get caught up in focusing your attention and energy on day-to-day operations, and in doing so, you might neglect some of the looming risks that threaten the continuity of your business. You need to prioritize risk assessment and management.</p>
<p>Just reading that you need to invest in &#8220;Risk Management&#8221; probably makes you shudder. Admittedly, when a business owner has to start quantifying and qualifying potential areas of business risk, the process can seem daunting and full of questions &#8230; &#8220;What kinds of risks should I be concerned with?&#8221; &#8220;Once I find a potential risk, should I mitigate it? Avoid it? Accept it?&#8221; &#8220;How much do I need to spend on risk management?&#8221;</p>
<p>When it comes to risk management in hosting, the biggest topics are information security, backups and disaster recovery. While those general topics are common, each business&#8217;s needs will differ greatly in each area. Because risk management isn&#8217;t a very &#8220;cookie-cutter&#8221; process, it&#8217;s intimidating. It&#8217;s important to understand that protecting your business from risks isn&#8217;t a destination &#8230; it&#8217;s a journey, and whatever you do, you&#8217;ll be better off than you were before you did it.</p>
<p>Because there&#8217;s not a &#8220;100% Complete&#8221; moment in the process of risk management, some people think it&#8217;s futile &mdash; a gross waste of time and resources. History would suggest that risk management can save companies <a href="http://www.marketwatch.com/story/hsbc-fined-52-million-over-lost-data?siteid=rss&#038;rss=1">millions of dollars</a>, and that&#8217;s just when you look at <a href="http://www.pcworld.com/article/257045/6_5m_linkedin_passwords_posted_online_after_apparent_hack.html">failures</a>. You don&#8217;t see headlines when businesses effectively protect themselves from attempted hacks or when sites automatically fail over to a new server after a hardware failure.</p>
<p>It&#8217;s unfortunate how often confidential customer data is unintentionally released by employees or breached by malicious attackers. Especially because those instances are often so easily preventable. When you understand the potential risks of your business&#8217;s confidential data in the hands of the wrong people (whether malicious attackers or careless employees), you&#8217;ll usually take action to avoid quantifiable losses like monetary fines and unquantifiable ones like the loss of your reputation. </p>
<p>More and more, regulations are being put in place to holding companies accountable for protecting their sensitive information. In the healthcare industry businesses have to meet the strict Health Insurance Portability and Accountability Act (HIPAA) regulations. Sites that accept credit card payments online are required to operate in Payment Card Industry (PCI) Compliance. Data centers will spend hours (and hours and hours) achieving and maintaining their SSAE 16 certification. These rules and requirements are not arbitrarily designed to be restrictive (though they can feel that way sometimes) &#8230; They are based on best practices to ultimately protect businesses in those industries from risks that are common throughout the respective industry.</p>
<p>Over the coming months, I&#8217;ll discuss ways that you as a SoftLayer customer can mitigate and manage your risk. We&#8217;ll talk about security and backup plans that will incrementally protect your business and your customers. While we won&#8217;t get to the destination of 100% risk-mitigated operations, we&#8217;ll get you walking down the path of continuous risk assessment, identification and mitigation. </p>
<p>Stay tuned!</p>
<p>-Matthew</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/an-introduction-to-risk-management/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Spark::red: Tech Partner Spotlight</title>
		<link>http://blog.softlayer.com/2012/sparkred-tech-partner-spotlight/</link>
		<comments>http://blog.softlayer.com/2012/sparkred-tech-partner-spotlight/#comments</comments>
		<pubDate>Fri, 05 Oct 2012 18:05:55 +0000</pubDate>
		<dc:creator>Guest Blog</dc:creator>
				<category><![CDATA[Partner Marketplace]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[ATG hosting]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[myths]]></category>
		<category><![CDATA[Oracle ATG]]></category>
		<category><![CDATA[Oracle Commerce]]></category>
		<category><![CDATA[partner]]></category>
		<category><![CDATA[partner marketplace]]></category>
		<category><![CDATA[PCI Compliance]]></category>
		<category><![CDATA[PCI DSS]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[security standards]]></category>
		<category><![CDATA[tech partner]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=9372</guid>
		<description><![CDATA[This guest blog comes to us from Spark::red, a featured member of the SoftLayer Technology Partners Marketplace. Spark::red is a global PCI Level 1 compliant hosting provider specializing in Oracle ATG Commerce. With full-redundancy at every layer, powerful servers, and knowledgeable architects, Spark::red delivers exceptional environments in weeks, instead of months. In this video we [...]]]></description>
			<content:encoded><![CDATA[<p class="attribution"> This guest blog comes to us from <a href="https://www.sparkred.com/">Spark::red</a>, a featured member of the SoftLayer Technology Partners Marketplace. Spark::red is a global PCI Level 1 compliant hosting provider specializing in Oracle ATG Commerce. With full-redundancy at every layer, powerful servers, and knowledgeable architects, Spark::red delivers exceptional environments in weeks, instead of months. In this video we talk to Spark::red co-founder Devon Hillard about what Spark::red does, how they help companies that are outgrowing current solutions, and why they chose SoftLayer.</p>
<div class="yt560"><iframe src="http://www.youtube.com/embed/STrA9BJedOk" frameborder="0" width="560" height="349"></iframe></div>
<div class="more-info"><strong>Company Website:</strong> <a href="https://www.sparkred.com/">https://www.sparkred.com/</a><br />
<strong>Tech Partners Marketplace:</strong> <a href="http://www.softlayer.com/partners/marketplace/sparkred">http://www.softlayer.com/marketplace/sparkred</a></div>
<style type="text/css" media="screen">
h4{
font-size:16px;
color: #972F2C;
margin-bottom:0;
padding-bottom:0;
}
</style>
<h3>The Three Most Common PCI Compliance Myths</h3>
<p>As a hosting provider that specializes in Oracle ATG Commerce, <a href="http://www.sparkred.com">Spark::red</a> has extensive experience and expertise when it comes to the Payment Card Industry Data Security Standards (PCI DSS). If you&#8217;re not familiar with <a href="https://www.pcisecuritystandards.org/">PCI DSS</a>, they are standards imposed on companies that process payment data, and they are designed to protect the company and its customers. </p>
<p>We&#8217;ve been helping online businesses maintain PCI Compliance for several years now, and in that time, we&#8217;ve encountered a great deal of confusion and misinformation when it comes to compliance. Despite numerous documents and articles available on this topic, we&#8217;ve found that three myths seem to persist when it comes to PCI DSS compliance. Consider us the PCI DSS compliance mythbusters.</p>
<h4 style="margin-bottom:5px; padding-bottom:0;">Myth 1: Only large enterprise-level businesses are required to be PCI Compliant.</h4>
<p style="margin-top:0; padding-top:0;">According to PCI DSS, every company involved in payment card processing online or offline should be PCI Compliant. The list of those companies includes e-commerce businesses of all sizes, banks and web hosting providers. It&#8217;s important to note that I said, &#8220;should be PCI Compliant&#8221; here. There is no federal law that makes PCI compliance a legal requirement. However, a business <strong>IS</strong> required to be PCI compliant technically in order to take and process Visa or MasterCard payments. Failure to operate in with PCI compliance could mean huge fees if you&#8217;re found in violation after a breach.</p>
<p>Payment card data security is the most significant concern for cardholders, and it should be a priority for your business, whether you have two hundred customers or two million customers. If you&#8217;re processing ANY credit card payments, you should make sure you are PCI-compliant.</p>
<p>There are four levels of PCI compliance based on the number of credit card transactions your business processes a year, so the PCI compliance process is going to look different for small, medium-sized and large businesses. Visit the <a href="https://www.pcisecuritystandards.org/">PCI Security Standards Council</a> website to check which level of PCI compliance your business needs.</p>
<p><em>Myth 1: Busted.</em></p>
<p><span id="more-9372"></span></p>
<h4 style="margin-bottom:5px; padding-bottom:0;">Myth 2: A business that uses a PCI-compliant managed hosting provider automatically becomes PCI-compliant.</h4>
<p style="margin-top:0; padding-top:0;">Multiple parties are involved in processing payment data, and each of them needs to meet certain standards to guarantee cardholders&#8217; data security. From a managed hosting provider perspective, we&#8217;re responsible for things like proper firewall installation and maintenance, updating anti-virus programs of our servers, providing a unique ID for each person with computer access to restrict access to the most sensitive data, regular system scanning for vulnerabilities. Our customer &mdash; an online retailer, for example &mdash; would need to develop its software applications in accordance with PCI DSS, keep cardholders data storage to a minimum, and perform application-layer penetration tests that are out of their hosting provider&#8217;s control.</p>
<p>If you&#8217;re pursuing PCI compliance, you have a significant advantage if you start with a PCI-compliant managed hosting provider. Many security questions are already answered by your PCI-compliant host, so there is a shorter list of things for you to be worry about. You save money, time and effort in the process of completing PCI certification.</p>
<p><em>Myth 2: Busted.</em></p>
<h4 style="margin-bottom:5px; padding-bottom:0;">Myth 3: A business that uses SSL certificates is PCI compliant.</h4>
<p style="margin-top:0; padding-top:0;">Secure Sockets Layer (SSL) certificates allow secure data transmission to and from the server through data encryption that significantly decreases the network vulnerabilities from IP spoofing, IP source rooting, DNS spoofing, man-in-the-middle attacks and other threats from hackers. However, SSL cannot protect cardholder data from attacks using cross-site scripting or SQL injection, and they don&#8217;t provide secure audit trails or event monitoring. SSL certificates are an important part of secure transactions, but they&#8217;re only part of PCI DSS compliance.</p>
<p><em>Myth 3: Busted.</em></p>
<p>If you have questions about PCI compliance or you&#8217;re interested in Oracle ATG Hosting, visit <a href="http://www.sparkred.com">Spark::red</a>, give us a call or send us an email, and we&#8217;ll do what we can to help. When PCI compliance doesn&#8217;t seem like a scary monster in your closet, it&#8217;s easier to start the process and get it done quickly.</p>
<p>-Elena Rybalchenko, <a href="https://www.sparkred.com/">Spark::red</a></p>
<div class="tpm-note">This guest blog series highlights companies in SoftLayer&#8217;s <a href="http://www.softlayer.com/partners/marketplace/index">Technology Partners Marketplace</a>. <br/>These <a href="http://blog.softlayer.com/partner-marketplace/">Partners</a> have built their businesses on the SoftLayer Platform, and we&#8217;re excited for them to tell their stories. New Partners will be added to the Marketplace each month, so stay tuned for many more come.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/sparkred-tech-partner-spotlight/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating a Usable, Memorable and Secure Password</title>
		<link>http://blog.softlayer.com/2012/creating-a-usable-memorable-and-secure-password/</link>
		<comments>http://blog.softlayer.com/2012/creating-a-usable-memorable-and-secure-password/#comments</comments>
		<pubDate>Mon, 10 Sep 2012 14:40:59 +0000</pubDate>
		<dc:creator>Phil Jackson</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SoftLayer]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[account]]></category>
		<category><![CDATA[breach]]></category>
		<category><![CDATA[complex]]></category>
		<category><![CDATA[cypher]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[lock picking]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://blog.softlayer.com/?p=9207</guid>
		<description><![CDATA[When I was young, I vividly remember a wise man sharing a proverb with me: &#8220;Locks are for honest people.&#8221; The memory is so vivid because it completely confused me &#8230; &#8220;If everyone was honest, there would be no need for locks,&#8221; I thought, naively. As it turns out, everyone isn&#8217;t honest, and if &#8220;locks [...]]]></description>
			<content:encoded><![CDATA[<p>When I was young, I vividly remember a wise man sharing a proverb with me: &#8220;Locks are for honest people.&#8221; The memory is so vivid because it completely confused me &#8230; &#8220;If everyone was honest, there would be no need for locks,&#8221; I thought, naively. As it turns out, everyone isn&#8217;t honest, and if &#8220;locks keep honest people honest,&#8221; they don&#8217;t do anything to/for dishonest people. That paradox lingered in the back of my mind, and a few years later, I found myself using some sideways logic to justify learning the mechanics of lock picking. </p>
<p>I ordered my first set of lock picks (with instruction booklet) for around $10 online. When the package arrived, I scrambled to unwrap it like Ralphie unwrapped the &#8220;Red Ryder&#8221; BB gun in &#8220;A Christmas Story,&#8221; and I set out to find my first lock to pick. After a few unsuccessful attempts, I turned to the previously discarded instruction booklet, and I sat down to actually learn what I was supposed to be doing. That bit of study wound up being useful; with that knowledge, I managed to pick my first lock. </p>
<p>I tend to collect hobbies. I also tend to shift every spare thought towards my newest obsession until whatever goal I set is accomplished. To this end, I put together a mobile lock-picking training device &mdash; the cylinder/tumbler from a dead bolt, my torq wrench wrapped with electrical tape to prevent the recurrence of blisters, and my favorite snake rake. I took this device with me everywhere, unconsciously unlocking and resetting the lock as I went about my shopping, sat in a doctor&#8217;s office or walked around the block. In my mind, I was honing my skills on a mechanical challenge, but as one of my friends let me know, people who saw me playing with the lock in public would stare at me like I was a budding burglar audaciously flaunting his trade. </p>
<p>I spent less money on a lock picking set than I would have on a lock, and I felt like had a key to open any door. The only thing between me and the other side of a locked door in front of me was my honesty. What about the dishonest people in the world, though? They have the same access to cheap tools, and while they probably don&#8217;t practice their burgling in public, can spend just as much time sharpening their skills in private. From then on, I was much more aware of the kinds of locks I bought and used to secure my valuables.</p>
<p>When I started getting involved in technology, I immediately noticed the similarities between physical security and digital security. When I was growing up, NBC public service announcements taught me, &#8220;Knowledge is Power,&#8221; and that&#8217;s even truer now than it was then. We trust technology with our information, and if someone else gets access to that information, the results can be catastrophic.</p>
<p>Online, the most common &#8220;hacks&#8221; and security exploits are usually easily avoidable. They&#8217;re the IRL equivalent of leaving valuables on a table by an unlocked window with the thought, &#8220;The window is closed &#8230; My stuff is secure.&#8221; Some of those windows may be hard to reach, but some of them are street-level in high-traffic pedestrian areas. The most vulnerable and visible of access points: Passwords.</p>
<p>You&#8217;ve heard people tell you not to do silly things like making &#8220;1 2 3 4 5&#8243; your combination lock, and your IT team has probably gotten onto you about using &#8220;password&#8221; to log onto your company&#8217;s domain, but our tendency to create simpler passwords is a response to the inherent problem that a secure password is, by its nature, hard to remember. The average Internet user probably isn&#8217;t going to use pwgen or a password lockbox &#8230; If you had a list of passwords from a given site, my guess is that you&#8217;d wind up seeing a lot more pets&#8217; names and birth years than passwords like S0L@Y#Rpr!Vcl0udN)3mblyR#Q. What people need to understand is that the &#8220;secure&#8221; password can be just as easy to remember as &#8220;Fluffy1982.&#8221;</p>
<h3>Making a *Usable* Secure Password</h3>
<p>The process of creating a unique, usable and secure password is pretty straightforward:</p>
<ol>
<li>Start with a series of words or phrases which have a meaning to you: A quote in a movie, song lyric, title of your favorite book series, etc. For our example, let&#8217;s use &#8220;SoftLayer Private Clouds, no  assembly required.&#8221;</p>
<li>l33t up your phrase. To do this, you&#8217;d remove punctuation and spaces, and you&#8217;d replace a letter in the phrase with a special character. You predetermining these conversions to create a template of alterations to any string which only take minimal thought from you. In the simplest of cyphers, letters become a numbers or characters that resemble the letter: An &#8220;o&#8221; becomes a &#8220;0,&#8221; &#8220;e&#8221; becomes a &#8220;3,&#8221; an &#8220;a&#8221; becomes an &#8220;@,&#8221; etc. In more complicated structures, a character can be different based on where it lies in the string or what less-commmon substitutions you choose to use. Our example at this point would look like this: &#8220;S0ftL@y3rPr1v@t3Cl0udsn0@ss3mblyr3qu1r3d&#8221;</li>
<li>Right now, we have a password that would make any brute-forcing script-kiddie yearn for the Schwarts, but we&#8217;re not done yet. If someone were to find our cypher and personal phrase, they may be able to figure out our password. Also, this password is too long for use in many sites with password restrictions that cap you a 16 characters. Our goal is to create a password between 15-25 characters and be prepared to make cuts when necessary.</li>
<li>A good practice is to cut out the beginning or ending of a word. In our example (taking out the l33t substitutions for simplicity here), our phrase might look like this: &#8220;so-layer-priv-cloud-no-embly-req&#8221;</li>
<li>When we combine the shortened password with l33t substitutions, the last trick we want to incorporate is using our Shift key. An &#8220;e&#8221; might be a &#8220;3&#8243; in a simple l33t cypher, but if we use the Shift key, the &#8220;e&#8221; becomes a &#8220;#&#8221; (Shift+&#8221;3&#8243;): &#8220;S0L@Y#Rpr!Vcl0udN)#mblyR#Q&#8221;</li>
</ol>
<p>The main idea is that when you&#8217;re &#8220;locking&#8221; your accounts with a password, you don&#8217;t need the most complicated lock ever created &#8230; You just need one that can&#8217;t be picked easily. Establish a pattern of uncommon substitutions that you can use consistently across all of your sites, and you&#8217;ll be able to use seemingly common phrases like &#8220;Fluffy is my dog&#8217;s name&#8221; or &#8220;Neil Armstrong was an astronaut&#8221; without worrying about anyone being able to &#8220;open your window.&#8221;</p>
<p>-Phil (<a href="http://twitter.com/SoftLayerDevs">@SoftLayerDevs</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.softlayer.com/2012/creating-a-usable-memorable-and-secure-password/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
