<?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>Apache, Linux ,Seo tricks and many more &#187; Apache</title>
	<atom:link href="http://www.gossiplime.com/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gossiplime.com</link>
	<description>This blog is just for all persons to know more about php, apache , linux , seo etc</description>
	<lastBuildDate>Wed, 08 Jul 2009 16:40:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Install mod_bandwidth</title>
		<link>http://www.gossiplime.com/2009/03/install-mod_bandwidth/</link>
		<comments>http://www.gossiplime.com/2009/03/install-mod_bandwidth/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 16:46:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[mod_bandwidth]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=308</guid>
		<description><![CDATA[What is Mod_Bandwidth &#8220;Mod_bandwidth&#8221; (mod bandwidth) is a module for the Apache webserver that enable the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain. For Apache 1.3x. ONLY! This how-to is not compatible with old versions of apache, including but not limited to 1.3beta How [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is Mod_Bandwidth</strong></p>
<p>&#8220;Mod_bandwidth&#8221; (mod bandwidth) is a module for the Apache webserver that enable the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain.</p>
<p>For Apache 1.3x. ONLY! This how-to is not compatible with old versions of apache, including but not limited to 1.3beta</p>
<p><span style="color: #333399;"><strong>How to install mod_bandwidth</strong></span></p>
<p>1. Login to your server via SSH as root.</p>
<p>2. Type: mkdir /root/mod_bw</p>
<p>3. Type: cd /root/mod_bw</p>
<p>4. Type: wget ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c</p>
<p>5. Type: /usr/local/apache/bin/apxs -c /root/mod_bw/mod_bandwidth.c -o /usr/local/apache/libexec/mod_bandwidth.so</p>
<p>6. Type: mkdir /usr/local/apache/bw_limit</p>
<p>7. Type: mkdir /usr/local/apache/bw_limit/link</p>
<p>8. Type: mkdir /usr/local/apache/bw_limit/master</p>
<p>9. Type: pico -w /etc/httpd/conf/httpd.conf</p>
<p>10. Locate the following Line: LoadModule rewrite_module libexec/mod_rewrite.so</p>
<p>11. <strong>Before</strong> the above line add this:<br />
LoadModule bandwidth_module libexec/mod_bandwidth.so</p>
<p>12. Now locate this line: AddModule mod_env.c</p>
<p>13. <strong>Before</strong> the above line add this:<br />
AddModule mod_bandwidth.c</p>
<p>14. Now locate this line: # Document types.</p>
<p>15. <strong>Before</strong> the above line add this:<br />
BandWidthDataDir &#8220;/usr/local/apache/bw_limit&#8221;<br />
BandWidthModule On</p>
<p>16. To enable mod_bandwidth on a virtual host locate the virtual host entry for the specified domain/acount you wish to limit. Just before the line add the following:<br />
BandWidthModule On<br />
BandWidth all 512</p>
<p>The 512 can be replaced with whatever rate you wish to limit the acount too.</p>
<p>17. Save the file and exit.<br />
CTRL-X then Y then enter.</p>
<p>18. Type: service httpd restart</p>
<p>19. Type: cd /usr/sbin</p>
<p>20. Type: wget ftp://ftp.cohprog.com/pub/apache/module/cleanlink.pl</p>
<p><strong>What is cleanlink?</strong><br />
Cleanlink is a deamon that is used to clean links created by mod_bandwidth when they aren&#8217;t removed properly by the server. (When a httpd process doesn&#8217;t terminate the usual way.)</p>
<p>21. Type: chmod 755 cleanlink.pl</p>
<p>22. Type: pico -w cleanlink.pl</p>
<p>23. Change $LINKDIR to the following:<br />
$LINKDIR=&#8221;/usr/local/apache/bw_limit/link&#8221;;</p>
<p>24. Save the file and exit.<br />
CTRL-X then Y then enter.</p>
<p>25. Type: perl cleanlink.pl</p>
<p>26. Type: pico -w /etc/rc.d/rc.local</p>
<p>27. Scroll down to the very end of the file and add the following:<br />
# The following line Launches CleanLink for Mod_Bandwidth<br />
perl /usr/sbin/cleanlink.pl</p>
<p>28. Save the file and exit.<br />
CTRL-X then Y then enter.</p>
<p>mod_bandwidth has many options. If you wish to modify mod_bandwidth and enable more options please visit the documentation available by the programmer here: http://www.cohprog.com/v3/bandwidth/doc-en.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/03/install-mod_bandwidth/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Stop Coredump file</title>
		<link>http://www.gossiplime.com/2009/03/stop-coredump-file/</link>
		<comments>http://www.gossiplime.com/2009/03/stop-coredump-file/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 10:30:06 +0000</pubDate>
		<dc:creator>sps</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[apace]]></category>
		<category><![CDATA[coredump]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=139</guid>
		<description><![CDATA[Many webmasters ask me how to stop core dump files in Apache.. Now today i will tell you how to stop core dump file in apache.  This is basically happens when System Crashes it makes a coredump file in the public_html Directory. The possible reason for the core files getting generated is when a php [...]]]></description>
			<content:encoded><![CDATA[<p>Many webmasters ask me how to stop core dump files in Apache.. Now today i will tell you how to stop core dump file in apache.  This is basically happens when System Crashes it makes a coredump file in the public_html Directory.</p>
<p>The possible reason for the core files getting generated is when a php process is killed, apache creates core files under your account .</p>
<p>On phpSuexec servers this may cause due to incorrect php.ini file placed in your account and if it is caused due to php/apache then you can get rid off those core files by editing the httpd startup file on the server end .</p>
<p>Lets start</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 440px; height: 34px; text-align: left;" dir="ltr">root@server [~]# vi /etc/init.d/httpd</pre>
</div>
<p>Search for ulimit lines .For eg : you can see these lines</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 440px; height: 82px; text-align: left;" dir="ltr">ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384</pre>
</div>
<p>You need to add ulimit -c 0 at the end .Which will look like :</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 440px; height: 98px; text-align: left;" dir="ltr">ulimit -n 1024
ulimit -n 4096
ulimit -n 8192
ulimit -n 16384
ulimit -c 0</pre>
</div>
<p>root@server [~]# :wq</p>
<p>Save changes and quit.<br />
Now kill / stop apache service and then start apache service on the server .</p>
<div style="margin: 5px 20px 20px;">
<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
<pre class="alt2" style="border: 1px inset; margin: 0px; padding: 6px; overflow: auto; width: 440px; height: 114px; text-align: left;" dir="ltr">root@server [~]# service httpd stop
root@server [~]# service httpd stop
httpd (no pid file) not running
root@server [~]# service httpd startssl
root@server [~]# service httpd startssl
httpd (pid 21154) already running</pre>
</div>
<p>Finished <img src='http://www.gossiplime.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>It works most of the OS.</p>
<p>Self tested on CENTOS 5.2 i686 on standard</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/03/stop-coredump-file/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Exim Failed &#8211; Exim is not running</title>
		<link>http://www.gossiplime.com/2009/02/exim-failed-exim-is-not-running/</link>
		<comments>http://www.gossiplime.com/2009/02/exim-failed-exim-is-not-running/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 08:00:34 +0000</pubDate>
		<dc:creator>sps</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=277</guid>
		<description><![CDATA[A restart was attempted automagically. Service Check Method: [check command] Cmd Service Check Raw Output: Exim is not running This is a bug in Exim here are the steps how i fix this problem Hello friends you can doit by SSH I first ran: /scripts/eximup &#8211;force &#8211;source I then removed the old exim RPM, which [...]]]></description>
			<content:encoded><![CDATA[<p>A restart was attempted automagically.<br />
Service Check Method:  [check command]</p>
<p>Cmd Service Check Raw Output: Exim is not running</p>
<p>This is a bug in Exim<br />
here are the steps how i fix this problem</p>
<p> Hello friends<br />
you can doit by SSH<br />
 I first ran:</p>
<p> /scripts/eximup &#8211;force &#8211;source</p>
<p> I then removed the old exim RPM, which was preventing the correct one from</p>
<p> being updated.</p>
<p> I then ran:</p>
<p> /scripts/eximup &#8211;force</p>
<p> Exim is now up well.</p>
<p> Thank you. <img src='http://www.gossiplime.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/02/exim-failed-exim-is-not-running/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Install mod_limitipconn For Apache</title>
		<link>http://www.gossiplime.com/2009/02/install-mod_limitipconn-for-apache/</link>
		<comments>http://www.gossiplime.com/2009/02/install-mod_limitipconn-for-apache/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 17:59:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[mp3 limit]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=233</guid>
		<description><![CDATA[Installing mod_limitipconn.c This is the distribution page for the Apache module mod_limitipconn.c, which allows web server administrators to limit the number of simultaneous downloads permitted from a single IP address. Why did I write this module? Well, I run an mp3 server which since its inception was being constantly hosed by people who were trying [...]]]></description>
			<content:encoded><![CDATA[<p>Installing mod_limitipconn.c <img src='http://www.gossiplime.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> </p>
<p>This is the distribution page for the Apache module mod_limitipconn.c, which<br />
allows web server administrators to limit the number of simultaneous<br />
downloads permitted from a single IP address.</p>
<p>Why did I write this module? Well, I run an mp3 server which since its<br />
inception was being constantly hosed by people who were trying to download<br />
dozens of files at once. For months I scoured the Internet looking for a<br />
code snippet that would solve this problem. The closest thing I found was this<br />
patch against an old version of Apache, and it didn&#8217;t run properly on my Linux box<br />
(that was back then; nowadays, the patch doesn&#8217;t even apply cleanly to the<br />
Apache source tree).</p>
<p>Finally I gave up and decided to write something to do the job myself, and<br />
here&#8217;s the result.<br />
=================<br />
Log into ssh</p>
<p>(Apache 1.3.x) -<br />
cd /usr/src<br />
<a title="mod limitpcorn" href="http://dominia.org/djao/limit/mod_limitipconn-0.04.tar.gz" target="_self">http://dominia.org/djao/limit/mod_limitipconn-0.04.tar.gz</a><br />
tar xzvf mod_limitipconn-0.04.tar.gz<br />
cd mod_limitipconn-0.04</p>
<p>(Apache 2.0.x)<br />
cd /usr/src<br />
<a title="mod limitpcorn" href="http://dominia.org/djao/limit/mod_limitipconn-0.22.tar.gz" target="_self">http://dominia.org/djao/limit/mod_limitipconn-0.22.tar.gz</a><br />
tar xzvf mod_limitipconn-0.22.tar.gz<br />
cd mod_limitipconn-0.22</p>
<p>pico Makefile<br />
find the line that reads APXS=apxs<br />
change that to<br />
APXS=/usr/local/apache/bin/apxs</p>
<p>press cntrl O to save<br />
then cntrl X</p>
<p>// if your locations to apxs is different<br />
locate apxs and copy the path<br />
then paste that in<br />
//</p>
<p>make<br />
make install</p>
<p>service httpd restart</p>
<p>pico -w /etc/httpd/conf/httpd.conf</p>
<p>locate ExtendedStatus<br />
Make sure ExtendedStatus is on and without the comment at the start</p>
<p>and add this line to every virtual directory you want to limit<br />
or add it once to the main directory to limit all</p>
<p>MaxConnPerIP 3<br />
# exempting images from the connection limit is often a good<br />
# idea if your web page has lots of inline images, since these<br />
# pages often generate a flurry of concurrent image requests<br />
NoIPLimit image/*</p>
<p>MaxConnPerIP 1<br />
# In this case, all MIME types other than audio/mpeg and video*<br />
# are exempt from the limit check<br />
OnlyIPLimit audio/mpeg video</p>
<p>press cntrl O to save<br />
then cntrl X<br />
then service</p>
<p>httpd restart<br />
 <img src='http://www.gossiplime.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  When i try it i have limit /download location and works really good. so dude enjoy <img src='http://www.gossiplime.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/02/install-mod_limitipconn-for-apache/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Spam Injection Protect it with Apache ModSecurity</title>
		<link>http://www.gossiplime.com/2009/02/php-spam-injection-protect-it-with-apache-modsecurity/</link>
		<comments>http://www.gossiplime.com/2009/02/php-spam-injection-protect-it-with-apache-modsecurity/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 13:17:38 +0000</pubDate>
		<dc:creator>vinod</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux.Apace]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[server security]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=219</guid>
		<description><![CDATA[From my old experience with my server From time to time we work with clients who would like to upgrade their web sites. Often their site is composed of various one-off applications &#8212; typically PHP-based &#8212; that someone built for them. More often than not, these applications were not developed with security in mind. Our [...]]]></description>
			<content:encoded><![CDATA[<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 16pt;"><span style="line-height: 14pt;">From my old experience with my server From time to time we work with clients who would like to </span><span style="line-height: 14pt;">upgrade</span><span style="line-height: 14pt;"> their web sites. </span><span style="line-height: 14pt;">Often</span><span style="line-height: 14pt;"> their site is composed of various one-off applications &#8212; typically PHP-based &#8212; that someone built for them. More often than not, these applications were not developed with security in mind.</span></div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt; line-height: 14pt;">Our first reaction is to pull the plug, analyze, and rebuild a secure and scalable solution. But pulling the plug is usually not an option. If a company relies on an application for leads or sales, they probably can&#8217;t afford to shut it down for any length of time. Under these circumstances, triage is usually the best one can hope for.</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="line-height: 14pt;">Fortunately, t</span><span style="line-height: 14pt;">here are a few things one can do to stem the bleeding. One of the more common problems with PHP-based applications is that they can allow the injection of malicious content, such as SQL or email spam. In some cases we find that over 95% of a client&#8217;s ISP traffic is coming from </span><span style="line-height: 14pt;">s</span><span style="line-height: 14pt;">pam injection. The solution? Grab an industrial size helping of Apache </span><a style="color: #000099; line-height: 14pt; opacity: 1; text-decoration: underline;" title="http://www.modsecurity.org/" href="http://www.modsecurity.org/">mod_security</a><span style="line-height: 14pt;">.</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="line-height: 14pt;">What is it? From the </span><a style="color: #000099; line-height: 14pt; opacity: 1; text-decoration: underline;" title="http://www.modsecurity.org/" href="http://www.modsecurity.org/">ModSecurity</a><span style="line-height: 14pt;"> home page:</span></div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-left: 32pt; margin-top: 0pt; text-indent: 0pt; font-family: 'Times-Roman','Times','Times New Roman','serif'; font-size: 12pt; font-style: italic; line-height: 14pt;">ModSecurityTM is an open source intrusion detection and prevention engine for web applications (or a web application firewall). Operating as an Apache Web server module or standalone, the purpose of ModSecurity is to increase web application security, protecting web applications from known and unknown attacks.</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 16pt;"><span style="line-height: 14pt;">Essentially, it inspects web traffic passing through the web server for suspicious content </span><span style="line-height: 14pt;">as well as</span><span style="line-height: 14pt;"> attempts to trigger buffer overflows, etc. When it finds such content, it can stop the traffic and/or log the incident.</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="line-height: 14pt;">To put mod_security to work for you, f</span><span style="line-height: 14pt;">irst, </span><a style="color: #000099; line-height: 14pt; opacity: 1; text-decoration: underline;" title="http://www.modsecurity.org/download/index.html" href="http://www.modsecurity.org/download/index.html">download</a><span style="line-height: 14pt;"> and unpack the tarball, build and install the DSO, and update Apache’s httpd.con</span><span style="line-height: 14pt;">f file.</span></div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt; font-family: 'ArialMT','Arial','sans-serif'; font-size: 10pt; line-height: 11pt;">cd /usr/local; tar xzf /root/modsecurity-apache-1.9.4.tar.gz<br />
cd /usr/local/modsecurity-apache-1.9.4/apache2<br />
/usr/local/apache2/bin/apxs -cia mod_security.c</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="line-height: 14pt;">Paste the ModSecurity minimal recommended filtering rules into your httpd.conf file.  Here are the first few lines from from the online manual&#8217;s </span><a style="color: #000099; line-height: 14pt; opacity: 1; text-decoration: underline;" title="http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/modsecurity-manual.html#aa-recommended_configuration" href="http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/modsecurity-manual.html#aa-recommended_configuration">Appendix A: Recommended Configuration</a><span style="line-height: 14pt;">:</span></div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;"># Turn ModSecurity On</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterEngine On</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;"># Reject requests with status 403</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterDefaultAction &#8220;deny,log,status:403&#8243;</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;"># Some sane defaults</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterScanPOST On</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterCheckURLEncoding On</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterCheckUnicodeEncoding Off</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt;"><span style="line-height: 14pt;">If you&#8217;d just like to see if someone is trying to exploit your site, you can set up ModSecurity to simply audit your traffic.  The lines </span></div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;"># Log rule violations, but allow the requests</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterDefaultAction &#8220;log,pass&#8221;</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt;">will do that for you.  However, please note that if you want to merely log rule violations without denying the traffic, you must not include any implicit validations (URL encoding validation, Unicode  encoding validation, cookie format validation, and byte range  restrictions) in your rules.When you are satisfied with your rules, you can deny the traffic by changing<span style="line-height: 14pt;"> the default action to this:</span></div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;"># Deny requests and log with status 403</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;">SecFilterDefaultAction &#8220;deny,log,status:403&#8243;</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 16pt;"><span style="line-height: 14pt;">Once you&#8217;ve got a bunch of traffic in your audit log, you can grep through it to see if you&#8217;ve got visitors with bad intentions:</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="font-family: 'ArialMT','Arial','sans-serif'; font-size: 10pt; line-height: 11pt;">grep -i &#8216;to|bcc|cc&#8217; audit_log | less</span><span style="line-height: 14pt;"><br />
or<br />
</span><span style="font-family: 'ArialMT','Arial','sans-serif'; font-size: 10pt; line-height: 11pt;">grep -i &#8216;to|bcc|cc&#8217; audit_log | wc -l</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="line-height: 14pt;">You may find lots of suspicious lines. In fact, you may find that some spammers are including portions of books, stories, or other nonsense, presumably to get past the final recipients&#8217; </span><span style="line-height: 14pt;">B</span><span style="line-height: 14pt;">ayesian spam filters.</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt;">To block a common PHP mail injection exploit, add a rule like this to your httpd.conf file in the ModSecurity section:</div>
<div class="paragraph Free_Form" style="margin-bottom: 0pt; margin-top: 0pt; font-family: 'Courier','serif'; font-size: 10pt; line-height: 12pt;"># necessary to stop spammers doing mail injection into PHP mail forms!!!<br />
SecFilterSelective ARGS_VALUES &#8220;\n[[:space:]]*(to|bcc|cc)[[:space:]]*:.*@&#8221;</div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 16pt;"><span style="line-height: 14pt;">The ModSecurity site also conveniently includes a </span><a style="color: #000099; line-height: 14pt; opacity: 1; text-decoration: underline;" title="http://www.modsecurity.org/download/modsecurity-rules-current.tar.gz" href="http://www.modsecurity.org/download/modsecurity-rules-current.tar.gz">package of rules</a><span style="line-height: 14pt;">, in</span><span style="line-height: 14pt;">cluding PHP-related rules,</span><span style="line-height: 14pt;"> grouped by function. </span><span style="line-height: 14pt;">Note that there are “SQL Injection Attack” rules in the “general” conf file. Y</span><span style="line-height: 14pt;">ou can include the</span><span style="line-height: 14pt;"> rule groups you want by using</span><span style="line-height: 14pt;"> an &#8220;Include&#8221; directive in the ModSecurity section of your httpd.conf file</span><span style="line-height: 14pt;">; i.e. “Include conf/modsecurity-php.conf”.</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; margin-bottom: 0pt; margin-top: 0pt; padding-bottom: 16pt; padding-top: 0pt;"><span style="line-height: 14pt;">Th</span><span style="line-height: 14pt;">ese rules </span><span style="line-height: 14pt;">are a good place to start, as are the rules from </span><a style="color: #000099; line-height: 14pt; opacity: 1; text-decoration: underline;" title="http://gotroot.com/tiki-index.php?page=mod_security+rules" href="http://gotroot.com/tiki-index.php?page=mod_security+rules">gotroot.com</a><span style="line-height: 14pt;">. You may need to tweak these a little bit, and be selective in which rulesets you apply. For example, </span><span style="line-height: 14pt;">o</span><span style="line-height: 14pt;">ften aggregating IP addresses such as AOL proxies are blocked due to the blacklist rules, which may not be what you want.</span></div>
<div class="paragraph Free_Form" style="line-height: 14pt; padding-bottom: 0pt;">This is only a brief introduction, but I hope you will try ModSecurity for yourself, and discover how powerful it can be.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2009/02/php-spam-injection-protect-it-with-apache-modsecurity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zone transfer AXFR + Change or Disable Name Server version</title>
		<link>http://www.gossiplime.com/2008/09/zone-transfer-axfr/</link>
		<comments>http://www.gossiplime.com/2008/09/zone-transfer-axfr/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 10:07:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[AXFR]]></category>
		<category><![CDATA[Linux.Apace]]></category>
		<category><![CDATA[named.conf]]></category>
		<category><![CDATA[NS]]></category>

		<guid isPermaLink="false">http://www.gossiplime.com/?p=160</guid>
		<description><![CDATA[At least one of your nameservers allowed a zone transfer to be performed. The zone transfer enables the extraction of all DNS data available for the zone. According to DNS best practices it is advisable to disable zone transfers for public slave zones. To disable zone transfer Login with root edit named.conf root@server [~]# vi [...]]]></description>
			<content:encoded><![CDATA[<p>At least one of your nameservers allowed a zone transfer to be performed.  The zone transfer enables the extraction of all DNS data available for the zone.  According to DNS best practices it is advisable to disable zone transfers for public slave zones.</p>
<p>To disable zone transfer</p>
<p>Login with root</p>
<p>edit named.conf</p>
<p>root@server [~]# vi /etc/named.conf</p>
<p>by setting this in options {}</p>
<p>allow-transfer { }; 		<!-- / message --> <!-- controls --></p>
<p>root@server [~]# :wq</p>
<p><img class="alignnone size-full wp-image-174" title="axfr-ns" src="http://www.gossiplime.com/wp-content/uploads/2008/09/axfr-ns.jpg" alt="axfr-ns" width="510" height="513" /></p>
<p>Those persons who want to <strong>change there or disable thier nameserver Version</strong> do as writen in the above image.</p>
<p>version  &#8221; &#8221; ;</p>
<p>This will disable your name server Version</p>
<p>That&#8217;s it you are done..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gossiplime.com/2008/09/zone-transfer-axfr/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

