<?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>EZ Linux Admin &#187; Linux Security</title>
	<atom:link href="http://www.ezlinuxadmin.com/category/linux-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ezlinuxadmin.com</link>
	<description>Making Linux Easier</description>
	<lastBuildDate>Tue, 29 Jun 2010 19:37:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mod_cband the new Mod_Bandwidth</title>
		<link>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 02:52:12 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[limit server bandwidth]]></category>
		<category><![CDATA[mod_bandwidth]]></category>
		<category><![CDATA[mod_cband]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=453</guid>
		<description><![CDATA[I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it&#8217;s free. The new mod to regulate bandwidth and more is called Mod_cband I&#8217;m not sure what cband means but I [...]]]></description>
			<content:encoded><![CDATA[<p>I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it&#8217;s free. The new mod to regulate bandwidth and more is called Mod_cband I&#8217;m not sure what cband means but I can guess channel bandwidth.</p>
<p>Here is how to get it set up with Cantos 5.3 easily.</p>
<p>I wanted to host for my brother the latest WoW patch, but at a hefty 450 MB, I didn’t want to blow all my bandwidth on it either. I am setting a limit for the download at 2.5 TB of bandwidth, and limiting it to 5mbs at 10 connections a second. My hardware is RHEL 4 running on a P4 with Plesk 8. In the guide to follow, you’ll see a few steps that wouldn’t be needed on a non-plesk system. To setup bandwidth limiting for the host, we need to be able to compile a new apache module against our system, and then install and configure it.</p>
<p>Step 1: The prereqs</p>
<p>First I needed to setup a yum repository for FC4. This can be accomplished by issuing an RPM command:</p>
<p>rpm -ivh http://rpm.livna.org/livna-release-4.rpm</p>
<p>Now that you can access the RPM packages, we need to install http-devel using yum:</p>
<p>yum install httpd-devel</p>
<p>If all went well, we can now extract, compile, and install mod_cband for apache:</p>
<p>cd /tmp<br />
wget http://cband.linux.pl/download/mod-cband-0.9.7.4.tgz<br />
tar xzvf mod-cband-0.9.7.4.tgz<br />
cd mod-cband-0.9.7.4<br />
./configure<br />
make<br />
make install</p>
<p>If all went well, restart apache with the new module (you can check httpd.conf to make sure the module is going to be loaded):</p>
<p>/etc/init.d/httpd restart</p>
<p>Step 2: Configuration</p>
<p>Here’s where the Plesk part gets annoying. We can’t just edit our vhosts file, because plesk writes over it all the time. Instead, we edit a /home/httpd/vhosts/*/subdomains/*/conf/vhost.conf file. Mine looks like this:</p>
<p>CBandScoreboard /var/www/scoreboard<br />
CBandPeriod 4W<br />
CBandDefaultExceededCode 509<br />
CBandLimit 2500G<br />
CBandSpeed 5000 5 10<br />
CBandRemoteSpeed 1600 3 1<br />
&lt;Location /cband-status&gt;<br />
SetHandler cband-status<br />
&lt;/Location&gt;<br />
&lt;Location /cband-status-me&gt;<br />
SetHandler cband-status-me<br />
&lt;/Location&gt;</p>
<p>What does this mean? (1) Use /var/www/scoreboard to log usage and limits (2) Reset the limit count every 4 weeks (3) Throw a 509 error when the limits are exceeded (4) Allow 2.5TB per period (5) Allow 5mbs with 5 requests a second and 10 connections at a time oeverall (6) Allow 1.6mbs with 3 requests a second and 1 connections at a time per client (7) Allow us to access a page at /cband-status to view the status.</p>
<p>You’ll also need to issue commands to make the scoreboard directory, and to allow apache to own it:</p>
<p>mkdir /var/www/scoreboard<br />
chown apache:apache /var/www/scoreboard</p>
<p>Finally, Plesk requires you to inform it of your work:</p>
<p>/usr/local/psa/admin/sbin/websrvmng -u &#8211;vhost-name=yourdomain.com</p>
<p>If you restart Apache now, everything should work!</p>
<p>/etc/init.d/httpd restart</p>
<p>Step 3: An Example</p>
<p>You can take a peek at my status page right now if you’d like. It looks a bit like this:</p>
<p><a href="http://www.ezlinuxadmin.com/wp-content/uploads/2010/03/cband-panel.jpg"><img class="alignnone size-full wp-image-454" title="cband-panel" src="http://www.ezlinuxadmin.com/wp-content/uploads/2010/03/cband-panel.jpg" alt="" width="450" height="209" /></a></p>
<p>A quick note, I simply just added:</p>
<blockquote><p>CBandPeriod 4W<br />
CBandLimit 10000G<br />
CBandSpeed 12000 40 80<br />
CBandRemoteSpeed 6400 12 4</p></blockquote>
<p>Now this set the limit to about 12 megs (MPS) a second which is a lot, but this customer is paying $250 a month to cover it. Most websites should max at about 5 MPS. I left out the other options because I didn&#8217;t need them and it&#8217;s less load on the server without them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Calm down rsync if it overloads your IO memory or CPU</title>
		<link>http://www.ezlinuxadmin.com/2010/03/rsync-overloads-io-memory-cpu/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/rsync-overloads-io-memory-cpu/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 11:57:14 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[limit io]]></category>
		<category><![CDATA[limit rsync]]></category>
		<category><![CDATA[rsync io]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=430</guid>
		<description><![CDATA[The trick is to limit I/O bandwidth for rsync.
The &#8211;bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter:
rsync &#8211;delete &#8211;numeric-ids &#8211;relative &#8211;delete-excluded &#8211;bwlimit=10000 /path/to/source /path/to/dest/?
10 megs a second is plenty of speed and will keep the server running smoothly when your [...]]]></description>
			<content:encoded><![CDATA[<p>The trick is to limit I/O bandwidth for rsync.</p>
<p>The &#8211;bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter:</p>
<blockquote><p>rsync &#8211;delete &#8211;numeric-ids &#8211;relative &#8211;delete-excluded &#8211;bwlimit=10000 /path/to/source /path/to/dest/?</p></blockquote>
<p>10 megs a second is plenty of speed and will keep the server running smoothly when your grabbing allot of files off of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/rsync-overloads-io-memory-cpu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Default MYSQL port</title>
		<link>http://www.ezlinuxadmin.com/2010/02/default-mysql-port/</link>
		<comments>http://www.ezlinuxadmin.com/2010/02/default-mysql-port/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:48:58 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Ports]]></category>
		<category><![CDATA[default mysql port]]></category>
		<category><![CDATA[mysql port]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=419</guid>
		<description><![CDATA[The default MYSQL port is:
3306
]]></description>
			<content:encoded><![CDATA[<p>The default MYSQL port is:</p>
<blockquote><p>3306</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/02/default-mysql-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Location of SSL certs and keys for CPanel and users</title>
		<link>http://www.ezlinuxadmin.com/2010/02/ssl-cert-key-locations-cpanel/</link>
		<comments>http://www.ezlinuxadmin.com/2010/02/ssl-cert-key-locations-cpanel/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 18:13:36 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[cpanel server]]></category>
		<category><![CDATA[cpanel ssl]]></category>
		<category><![CDATA[ssl key location]]></category>
		<category><![CDATA[ssl location]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=406</guid>
		<description><![CDATA[I was tracking down the location for each users SSL on a CPanel based server and wanted to post the locations here since they are a little off the beaten track. This is good to have around for when you want to clean out old certs and keys that are just jumbling your SSL trackers.
Here [...]]]></description>
			<content:encoded><![CDATA[<p>I was tracking down the location for each users SSL on a CPanel based server and wanted to post the locations here since they are a little off the beaten track. This is good to have around for when you want to clean out old certs and keys that are just jumbling your SSL trackers.</p>
<p>Here is the ssl key and certificate locations on a cpanel based server:</p>
<blockquote><p>/usr/share/ssl/private<br />
/usr/share/ssl/certs</p></blockquote>
<p>If you still need to buy a SSL cert please consider the non-profit <a href="http://www.sslca.com">SSLCA</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/02/ssl-cert-key-locations-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flushing iptables</title>
		<link>http://www.ezlinuxadmin.com/2010/01/flushing-iptables/</link>
		<comments>http://www.ezlinuxadmin.com/2010/01/flushing-iptables/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 07:51:10 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[flush]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[stop]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=379</guid>
		<description><![CDATA[iptables can block many different things and often it will block good servers inside of a network. The best to see if it&#8217;s a iptables issue. Try to clean them out with this if you have CSF on the server:
csf -f
If you still have a issue try to stop iptables like this:
service iptables stop
]]></description>
			<content:encoded><![CDATA[<p>iptables can block many different things and often it will block good servers inside of a network. The best to see if it&#8217;s a iptables issue. Try to clean them out with this if you have CSF on the server:</p>
<blockquote><p>csf -f</p></blockquote>
<p>If you still have a issue try to stop iptables like this:</p>
<blockquote><p>service iptables stop</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/01/flushing-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change root or user password on a Linux server</title>
		<link>http://www.ezlinuxadmin.com/2010/01/change-root-or-user-password-on-a-linux-server/</link>
		<comments>http://www.ezlinuxadmin.com/2010/01/change-root-or-user-password-on-a-linux-server/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 18:26:24 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[change root user password linux]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=372</guid>
		<description><![CDATA[Simple when logged in with the user type:
passwd
Then enter the new password twice to save it.
To change the root password on a Linux server you have to be logged in as root.
]]></description>
			<content:encoded><![CDATA[<p>Simple when logged in with the user type:</p>
<blockquote><p>passwd</p></blockquote>
<p>Then enter the new password twice to save it.</p>
<p>To change the root password on a Linux server you have to be logged in as root.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/01/change-root-or-user-password-on-a-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Have root logins emailed to you</title>
		<link>http://www.ezlinuxadmin.com/2009/11/have-root-logins-emailed-to-you/</link>
		<comments>http://www.ezlinuxadmin.com/2009/11/have-root-logins-emailed-to-you/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 21:50:55 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[root logins emailed]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=338</guid>
		<description><![CDATA[1. Login to your server and su to root, unless you logged in as root already.
2. cd /root (unless your default login folder is already root)
3. pico .bashrc (or use your favorite editor)
4. Scroll to the end of the file then add the following:
echo &#8216;ALERT &#8211; Root Shell Access (YourserverName) on:&#8217; `date` `who` &#124; mail [...]]]></description>
			<content:encoded><![CDATA[<p>1. Login to your server and su to root, unless you logged in as root already.</p>
<p>2. cd /root (unless your default login folder is already root)</p>
<p>3. pico .bashrc (or use your favorite editor)</p>
<p>4. Scroll to the end of the file then add the following:<br />
echo &#8216;ALERT &#8211; Root Shell Access (YourserverName) on:&#8217; `date` `who` | mail -s &#8220;Alert: Root Access from `who | cut -d&#8221;(&#8221; -f2 | cut -d&#8221;)&#8221; -f1`&#8221; you@yourdomain.com</p>
<p>Replace YourServerName with the handle for your actual server for example dwhs4@dwhs.net<br />
Replace you@yourdomain.com with your actual email address for example support@dwhs.net</p>
<p>5. Crtl + X  then Y</p>
<p>Now logout of SSH, close the connection and log back in! You should receive an email address of the root login alert a few minutes afterwards.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2009/11/have-root-logins-emailed-to-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP handler SuPHP</title>
		<link>http://www.ezlinuxadmin.com/2009/11/php-handler-suphp/</link>
		<comments>http://www.ezlinuxadmin.com/2009/11/php-handler-suphp/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 03:44:43 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[PHP handler SuPHP]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=329</guid>
		<description><![CDATA[Setting your PHP handler to SuPHP, which will cause PHP scripts to run as the user instead of &#8220;nobody&#8221;.  
Note that it has stricter permissions requirements than the other handlers&#8211;files must be 644, directories 755
]]></description>
			<content:encoded><![CDATA[<p>Setting your PHP handler to SuPHP, which will cause PHP scripts to run as the user instead of &#8220;nobody&#8221;.  </p>
<p>Note that it has stricter permissions requirements than the other handlers&#8211;files must be 644, directories 755</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2009/11/php-handler-suphp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>skdetect</title>
		<link>http://www.ezlinuxadmin.com/2009/08/skdetect/</link>
		<comments>http://www.ezlinuxadmin.com/2009/08/skdetect/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 05:25:23 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[skdetect]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=264</guid>
		<description><![CDATA[wget  http://tsd.student.utwente.nl/skdetect/skdetect-1.0pre4cvs
./skdetect-1.0pre4cvs
]]></description>
			<content:encoded><![CDATA[<p>wget  http://tsd.student.utwente.nl/skdetect/skdetect-1.0pre4cvs</p>
<p>./skdetect-1.0pre4cvs</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2009/08/skdetect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Root check</title>
		<link>http://www.ezlinuxadmin.com/2009/08/root-check/</link>
		<comments>http://www.ezlinuxadmin.com/2009/08/root-check/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 05:24:20 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Root check]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=262</guid>
		<description><![CDATA[Install chkrootkit
To install chrootkit, SSH into server and login as root.
At command prompt type: cd /root/
At command prompt type: wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
At command prompt type: tar xvzf chkrootkit.tar.gz 
At command prompt type: cd chkrootkit-0.47
At command prompt type: make sense
To run chkrootkit
At command prompt type: /root/chkrootkit-0.47/chkrootkit
Make sure you run it on a regular basis, perhaps including it [...]]]></description>
			<content:encoded><![CDATA[<p>Install chkrootkit</p>
<p>To install chrootkit, SSH into server and login as root.</p>
<p>At command prompt type: cd /root/</p>
<p>At command prompt type: wget ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz</p>
<p>At command prompt type: tar xvzf chkrootkit.tar.gz </p>
<p>At command prompt type: cd chkrootkit-0.47</p>
<p>At command prompt type: make sense</p>
<p>To run chkrootkit</p>
<p>At command prompt type: /root/chkrootkit-0.47/chkrootkit</p>
<p>Make sure you run it on a regular basis, perhaps including it in a cron job. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2009/08/root-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
