<?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>SysAdmin Valley &#187; security</title>
	<atom:link href="http://www.sysadminvalley.com/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sysadminvalley.com</link>
	<description>I might as well write this stuff down so I remember it tomorrow</description>
	<lastBuildDate>Tue, 18 May 2010 17:22:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Configuring Basic Cisco Router Security</title>
		<link>http://www.sysadminvalley.com/2010/03/23/configuring-basic-cisco-router-security/</link>
		<comments>http://www.sysadminvalley.com/2010/03/23/configuring-basic-cisco-router-security/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 13:08:01 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=204</guid>
		<description><![CDATA[Network security is a hot topic today, and will only increase in importance in the months and years ahead. While most of the attention is paid to exterior threats, there are some steps you can take to prevent unwanted Cisco router access from within your organization. Whether you want to limit what certain users can [...]]]></description>
			<content:encoded><![CDATA[<p>Network security is a hot topic today, and will only increase in  importance in the months and years ahead.</p>
<p>While most of the attention is paid to exterior threats, there are some  steps you can take to prevent unwanted Cisco router access from within  your organization.</p>
<p>Whether you want to limit what certain users can do and run on your  routers, or prevent unauthorized users in your company from getting to  config mode in the first place, here are four important yet simple steps  you can take to do so.</p>
<p><strong>Encrypt the passwords in your running configuration.</strong></p>
<p>This is a basic Cisco router security command that is often overlooked.   It doesn&#8217;t do you any good to set passwords for your ISDN connection or  Telnet connections if anyone who can see your router&#8217;s running  configuration can see the passwords.  By default, these passwords are  displayed in your running config in clear text.</p>
<p>One simple command takes care of that.  In global configuration mode,  run service password-encryption. This command will encrypt all clear  text passwords in your running configuration.</p>
<p><strong>Set a console password.</strong></p>
<p>If I walked into your network room right now, could I sit down and start  configuring your Cisco routers?</p>
<p>If so, you need to set a console password.  This password is a basic yet  important step in limiting router access in your network.  Go into line  configuration mode with the command &#8220;line con 0&#8243;, and set a password  with the password command.</p>
<p><strong>Limit user capabilities with privilege level commands.</strong></p>
<p>Not everyone who has access to your routers should be able to do  anything they want.  With careful use of privilege levels, you can limit  the commands given users can run on your routers.</p>
<p>Privilege levels can be a little clumsy at first, but with practice  you&#8217;ll be tying your routers down as tight as you like.  Visit <a href="http://www.cisco.com/univercd" target="_blank">www.cisco.com/univercd</a> for documentation on configuring privilege levels.</p>
<p><strong>Configure an &#8220;enable secret&#8221; password.</strong></p>
<p>It&#8217;s not uncommon for me to see a router that has an enable mode  password set, but it&#8217;s in clear text.</p>
<p>By using &#8220;enable secret&#8221;, the enable mode password will automatically  be encrypted.  Remember, if you have an enable password and enable  secret password set on the same router, the enable secret password takes  precedence.</p>
<p>These four basic steps will help prevent unwanted router access from  inside your network.  If only preventing problems from outside your  network was as simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2010/03/23/configuring-basic-cisco-router-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a self-signed SSL Certificate</title>
		<link>http://www.sysadminvalley.com/2009/02/17/creating-a-self-signed-ssl-certificate/</link>
		<comments>http://www.sysadminvalley.com/2009/02/17/creating-a-self-signed-ssl-certificate/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 15:16:24 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[mini how-to]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=72</guid>
		<description><![CDATA[For this you will need the openssl package.  First we want to start by generating a private key. root@localhost# openssl genrsa -out www.mydomain.com.key 1024 Generating RSA private key, 1024 bit long modulus &#8230;&#8230;&#8230;&#8230;.++++++ &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..++++++ e is 65537 (0&#215;10001) Then, we need to generate the certificate request and fill in the appropriate information.  Make sure that [...]]]></description>
			<content:encoded><![CDATA[<p>For this you will need the openssl package.  First we want to start by generating a private key.</p>
<blockquote><p>root@localhost# openssl genrsa -out www.mydomain.com.key 1024<br />
Generating RSA private key, 1024 bit long modulus<br />
&#8230;&#8230;&#8230;&#8230;.++++++<br />
&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..++++++<br />
e is 65537 (0&#215;10001)</p></blockquote>
<p>Then, we need to generate the certificate request and fill in the appropriate information.  Make sure that the &#8220;Common Name&#8221; matches the domain you want to protect via SSL, so if you domain was www.mydomain.com, use that.  If you wanted to protect mydomain.com (without the www.) then use that.</p>
<blockquote><p>root@localhost# openssl req -new -key www.mydomain.com.key -out www.mydomain.com.csr<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter &#8216;.&#8217;, the field will be left blank.<br />
&#8212;&#8211;<br />
Country Name (2 letter code) [GB]:<br />
State or Province Name (full name) [Berkshire]:<br />
Locality Name (eg, city) [Newbury]:<br />
Organization Name (eg, company) [My Company Ltd]:<br />
Organizational Unit Name (eg, section) []:<br />
Common Name (eg, your name or your server&#8217;s hostname) []:www.mydomain.com<br />
Email Address []:email@mydomain.com</p>
<p>Please enter the following &#8216;extra&#8217; attributes<br />
to be sent with your certificate request<br />
A challenge password []:<br />
An optional company name []:</p></blockquote>
<p>Next, generate the self-signed certificate. You can specify the number of days the cert is valid for.</p>
<blockquote><p>root@localhost# openssl x509 -req -days 365 -in www.mydomain.com.csr -signkey www.mydomain.com.key -out www.mydomain.com.crt<br />
Signature ok<br />
subject=/C=/ST=/L=/O=/CN=www.mydomain.com/emailAddress=email@mydomain.com<br />
Getting Private key</p></blockquote>
<p>Next, move the certificate and keyfile into apache&#8217;s SSL directory.</p>
<blockquote><p>mv www.mydomain.com.key /etc/httpd/conf/ssl.key/<br />
mv www.mydomain.com.crt /etc/httpd/conf/ssl.crt/</p></blockquote>
<p>Finally, we configure our SSL virtual host in Apache.  The simplest way to do this is to copy the virtual host for the site you want to make SSL, then add/change the following bits.</p>
<blockquote><p>&lt;VirtualHost 192.168.1.100:443&gt;<br />
&#8230;<br />
SSLEngine on<br />
SSLCertificateFile /etc/httpd/conf/ssl.key/www.mydomain.com.key<br />
SSLCertificateKeyFile /etc/httpd/conf/ssl.crt/www.mydomain.com.crt<br />
&#8230;<br />
&lt;/VirtualHost&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2009/02/17/creating-a-self-signed-ssl-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing SSHd</title>
		<link>http://www.sysadminvalley.com/2008/12/12/securing-sshd/</link>
		<comments>http://www.sysadminvalley.com/2008/12/12/securing-sshd/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 19:48:05 +0000</pubDate>
		<dc:creator>mshields</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[mini how-to]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.sysadminvalley.com/?p=5</guid>
		<description><![CDATA[The last thing you want is your Linux or Unix server to get hacked. And even though SSH is an encrypted there are a number of steps you can take to secure your SSH daemon. We will do 4 different things to secure sshd. For all these changes we will be editing the /etc/ssh/sshd_config file, [...]]]></description>
			<content:encoded><![CDATA[<p>The last thing you want is your Linux or Unix server to get hacked. And even though SSH is an encrypted there are a number of steps you can take to secure your SSH daemon. We will do 4 different things to secure sshd. For all these changes we will be editing the /etc/ssh/sshd_config file, use whatever is your favorite editor. In these examples we are leaving the commented lines for future reference.</p>
<p>Binding to 1 Port<br />
First we bind SSHd to a specific port. We do this because hackers will expect that you are going to use port 22 for SSH. You can change it to any random 4 or 5 digit number.</p>
<p>Find where it says:</p>
<blockquote><p>#Port 22</p></blockquote>
<p>And enter a new line below it like this(change 7676 to your own number):</p>
<blockquote><p>Port 7676</p></blockquote>
<p>Binding to SSHv2<br />
Next we are going to only allow access to SSH version 2, and not SSH version one. We do this because SSH version 2 is a more secure protocol.</p>
<p>Find where it says:</p>
<blockquote><p>#Protocol 2,1</p></blockquote>
<p>And enter a new line below it like this:</p>
<blockquote><p>Protocol 2</p></blockquote>
<p>Binding to 1 IP Address<br />
Third we will bind SSHd to a single IP address. The reason we do this is imagine that you have a webserver with 5 IPs (192.168.1.2 &#8211; 192.168.1.6) and you have all your hosted clients on 192.168.1.2. Most people trying to gain access are going to try to connect to that IP address. To make it more secure, we will take one IP out of your allocated space and use it only for SSH access. We will call this our Server Administion IP, say 192.168.1.6.</p>
<p>Find where it says:</p>
<blockquote><p>#ListenAddress 0.0.0.0</p></blockquote>
<p>And enter a new line below it like this:</p>
<blockquote><p>ListenAddress 192.168.1.6</p></blockquote>
<p>As a side note, if you use IPv6, there is a line below #ListenAddress 0.0.0.0 that is #ListenAddress ::. You can use this format to bind to a IPv6 address.</p>
<p>Disabling SSH access via root account<br />
Fourth, we are going to disable SSH access for the root account. We do this for security reasons. If for some reason your root password was comprimised, and root was allowed to SSH in, your system would be compromised. If you have disabled SSH access for root, then the hacker would have to also figure out another authorized user&#8217;s password to SSH in, then su to root. So this provides one more layer of security. But this does not protect against bad passwords.</p>
<p>Find where it says:</p>
<blockquote><p>#PermitRootLogin yes</p></blockquote>
<p>And enter a new line below it like this:</p>
<blockquote><p>PermitRootLogin no</p></blockquote>
<p>Make the changes take effect<br />
The last thing we need to do is restart the SSH process. This depends on which distribution you are running, but more RedHat based distros do it this way:</p>
<blockquote><p>/etc/init.d/sshd restart</p></blockquote>
<p>Finally, to gain access to your system, you would now ssh to 192.168.1.6 port 7676</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sysadminvalley.com/2008/12/12/securing-sshd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
