<?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>PRESOON.COM</title>
	<atom:link href="http://presoon.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://presoon.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 01 Jun 2011 09:19:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>93 error media manager found wrong tape in drive / How to reuse or recycle VERITAS NetBackup database catalog tapes for normal backups</title>
		<link>http://presoon.com/blog/2011/06/01/93-error-media-manager-found-wrong-tape-in-drive-how-to-reuse-or-recycle-veritas-netbackup-database-catalog-tapes-for-normal-backups/</link>
		<comments>http://presoon.com/blog/2011/06/01/93-error-media-manager-found-wrong-tape-in-drive-how-to-reuse-or-recycle-veritas-netbackup-database-catalog-tapes-for-normal-backups/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 09:14:04 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Veritas NetBackup]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=239</guid>
		<description><![CDATA[The tape which stored the Netbackup database cannot be directly erased or expired. If you try to expire the tape using the following command, it outputs with error. To reuse the tape, you need to relabel it. You can find the procedures below. First get the information about the tape. Now de-assign id. source volume [...]]]></description>
			<content:encoded><![CDATA[<p>The tape which stored the Netbackup database cannot be directly erased or expired.</p>
<p>If you try to expire the tape using the following command, it outputs with error.</p>
<div id='stb-box-6541' class='stb-custom_box' ></p>
<p>/usr/openv/netbackup/bin/admincmd/bpexpdate -ev &lt;tape id&gt; -d0</p>
<p></div>
<p>To reuse the tape, you need to relabel it. You can find the procedures below.</p>
<p><!-- p, li { white-space: pre-wrap; } -->First get the information about the tape.</p>
<div id='stb-box-5000' class='stb-custom_box' ></p>
<p>/usr/openv/volmgr/bin/vmquery -m &lt;media-id&gt;</p>
<p></div>
<p>Now de-assign id.</p>
<div id='stb-box-6167' class='stb-custom_box' ></p>
<p>/usr/openv/volmgr/bin/vmquery  -deassignbyid &lt;media id&gt; &lt;soure volume pool number&gt; 1</p>
<p></div>
<p>source volume pool number information can be obtained from previous command.</p>
<p>Now relabel Media.</p>
<div id='stb-box-9327' class='stb-custom_box' ></p>
<p>/usr/openv/netbackup/bin/admincmd/bplabel -ev &lt;media-id&gt; -d hcart2 -p &lt;volumepoolname&gt;</p>
<p>/usr/openv/netbackup/bin/admincmd/bplabel -ev &lt;media-id&gt; -d &lt;mediatype&gt; -p &lt;volumepoolname&gt;</p>
<p></div>
<p>If you enter wrong media type, you will not be able to proceed. To find the media type, Go to Media and Device Management &gt; Media &gt; Volume Pool  &gt; Select the volume pool to find the media. Here you can find the &#8220;Media type&#8221; too.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2011/06/01/93-error-media-manager-found-wrong-tape-in-drive-how-to-reuse-or-recycle-veritas-netbackup-database-catalog-tapes-for-normal-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find number of connections to port 25 / port 80 in Solaris (Mail Administration/Web Administration)</title>
		<link>http://presoon.com/blog/2011/03/29/find-number-of-connections-to-port-25-port-80-in-solaris-mail-administrationweb-administration/</link>
		<comments>http://presoon.com/blog/2011/03/29/find-number-of-connections-to-port-25-port-80-in-solaris-mail-administrationweb-administration/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 03:50:56 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Iplanet]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[DDos]]></category>
		<category><![CDATA[Denial of Service]]></category>
		<category><![CDATA[Mail administraiton]]></category>
		<category><![CDATA[Solaris Connections]]></category>
		<category><![CDATA[Spam Solaris]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=231</guid>
		<description><![CDATA[You can use the &#8220;netstat&#8221; command in Solaris likewise in a Linux box. However, the syntax differs. Also, the output of netstat is different from that of Linux OS. Hence there is a slight difference in the pipe scripts used. The above script is to find the number of connections to port 25, If you [...]]]></description>
			<content:encoded><![CDATA[<p>You can use the &#8220;netstat&#8221; command in Solaris likewise in a Linux box. However, the syntax differs. Also, the output of netstat is different from that of Linux OS. Hence there is a slight difference in the pipe scripts used.</p>
<div id='stb-box-1593' class='stb-custom_box' ><br />
netstat -an -f inet | awk &#8216;$1 ~ /\.25$/&#8217; | awk &#8216;{print $2}&#8217; | cut -d &#8216;.&#8217; -f1-4 | sort | uniq -c | sort -n<br />
</div>
<p>The above script is to find the number of connections to port 25, If you need to check the corresponding port, you can change it in the awk statement. To find the number of connections to port 80</p>
<div id='stb-box-5560' class='stb-custom_box' ><br />
netstat -an -f inet | awk &#8216;$1 ~ /\.80$/&#8217; | awk &#8216;{print $2}&#8217; | cut -d &#8216;.&#8217; -f1-4 | sort | uniq -c | sort -n<br />
</div>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2011/03/29/find-number-of-connections-to-port-25-port-80-in-solaris-mail-administrationweb-administration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iplanet Queue Administration in Solaris</title>
		<link>http://presoon.com/blog/2011/03/25/iplanet-queue-administration-in-solaris/</link>
		<comments>http://presoon.com/blog/2011/03/25/iplanet-queue-administration-in-solaris/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 05:18:14 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Iplanet]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=217</guid>
		<description><![CDATA[I have been working with Iplanet Mail server installed in Solaris 9. Since it is running the old version and the support for the old version has come to an end, I am contributing this basic post on queue administration. You can access the queue prompt using the &#8220;imsimta&#8221; binary. It is present in the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with Iplanet Mail server installed in Solaris 9. Since it is running the old version and the support for the old version has come to an end, I am contributing this basic post on queue administration.</p>
<p>You can access the queue prompt using the &#8220;imsimta&#8221; binary. It is present in the Iplanet installation directory.</p>
<div id='stb-box-1428' class='stb-custom_box' ><br />
cd /opt/imsvol/ims/msg-webmail/</p>
<p>./imsimta qm<br />
</div>
<p>You will receive the prompt like<br />
<div id='stb-box-9359' class='stb-custom_box' ><br />
qm.maint&gt;<br />
</div></p>
<p>To find the summary of the mail in queue, you can enter the verb &#8220;summarize&#8221; in the prompt</p>
<p>eg:<br />
<div id='stb-box-1799' class='stb-custom_box' ><br />
qm.maint&gt; summarize<br />
Messages<br />
Channel  Queued   Size (Kb)   Oldest<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
tcp_local      19     3168.28   19 Mar, 10:05:08<br />
tcp_imss       0        0.00<br />
tcp_auth       0        0.00<br />
reprocess       0        0.00<br />
process          0        0.00<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Totals      19     3168.28<br />
qm.maint&gt;<br />
</div></p>
<p>To check for spam mails in queue, you can use the &#8220;top&#8221; verb</p>
<div id='stb-box-5542' class='stb-custom_box' ><br />
qm.maint&gt; top<br />
Building a list of message files to scan from the queue directory tree&#8230;<br />
Scanning 20 message files&#8230;<br />
Scanned 20 message files in 0.0030 seconds (6572.46 messages/second)<br />
Top 20 Subject: header lines which occur 2 or more times</p>
<p>Count  Subject<br />
=================================================================<br />
2  =?us-ascii?Q?Spam=3A_=3D=3Futf=2D8=3FB=3FKCBUUE=30gKeWFqOOKo=2Bmdou<br />
2  =?us-ascii?Q?Spam=3A_=3D=3Fgb23=312=3FB=3FOTDM7MTavavN=2BMnPtqm=31p<br />
2  =?us-ascii?Q?Spam=3A_=3D=3Futf=2D8=3FB=3FKCBUUE=30gKeWFqOOAkemdoueU<br />
qm.maint&gt;<br />
</div><br />
If you need to delete the emails which is having a particular subject, you can use the &#8220;clean&#8221; verb</p>
<p>Here is an example on how to delete the mails having the subject &#8220;Delivery Notification Failed&#8221;</p>
<p><div id='stb-box-8435' class='stb-custom_box' ><br />
qm.maint&gt;clean -delete -subject &#8220;Delivery Notification Failed&#8221;<br />
</div><br />
If the -delete option is not specified, the messages are removed from the queue, but it will be marked as HELD message. Theses messages can be reprocessed, once the messages are released.</p>
<p>Another case where the subject line is smaller,  you need to use the following option</p>
<p><div id='stb-box-5265' class='stb-custom_box' ><br />
qm.maint&gt;clean -delete -min_length=6 -subject &#8220;Funny!&#8221;<br />
</div><br />
When the subject line has lesser number of characters or words, you have to use &#8220;-min_length&#8221; option and the number equals to the number of characters in the subject string.</p>
<p>The Iplanet message queue is divided into four subqueues,</p>
<p>tcp_local, tcp_imss , tcp_auth, reprocess and process</p>
<p>If lot of messages are accumulating in a particular queue, you can delete them too, this is done using the delete verb</p>
<p>To check the summary,<br />
<div id='stb-box-1587' class='stb-custom_box' ><br />
qm.maint&gt; summarize<br />
Messages<br />
Channel  Queued   Size (Kb)   Oldest<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
tcp_local      19     3168.28   19 Mar, 10:05:08<br />
tcp_imss       0        0.00<br />
tcp_auth       0        0.00<br />
reprocess       0        0.00<br />
process       0        0.00<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Totals      19     3168.28<br />
</div><br />
Now the queue, tcp_local has 19 messages, to delete the whole queue, you need to do the following,<br />
<div id='stb-box-7455' class='stb-custom_box' ><br />
qm.maint&gt; directory tcp_local</p>
<p>qm.maint&gt; delete 1-19<br />
</div><br />
Suppose if you need to delete messages from 1 to 10, you can do it by<br />
<div id='stb-box-6868' class='stb-custom_box' ><br />
qm.maint&gt; delete 1-10</p>
<p>&nbsp;<br />
</div><br />
Be sure to execute this verb only after switching it to the corresponding queue using the &#8220;directory verb&#8221;<br />
<div id='stb-box-9243' class='stb-custom_box' ><br />
eg  qm.maint&gt; directory tcp_local<br />
</div><br />
To Read the messages in the queue, the &#8220;read&#8221; verb can be used. Eg. you need to read message no 14 in tcp_imss queue<br />
<div id='stb-box-4446' class='stb-custom_box' ><br />
qm.maint&gt; directory tcp_imss</p>
<p>qm.maint&gt; read 14<br />
</div><br />
This will display the message headers, if you need to view its contents, you can use,<br />
<div id='stb-box-9587' class='stb-custom_box' ><br />
qm.maint&gt; read -content 14</p>
<p>&nbsp;<br />
</div>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2011/03/25/iplanet-queue-administration-in-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable Telnet in Solaris 9</title>
		<link>http://presoon.com/blog/2010/11/19/how-to-enable-telnet-in-solaris-9/</link>
		<comments>http://presoon.com/blog/2010/11/19/how-to-enable-telnet-in-solaris-9/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 08:15:08 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[telnet on solaris 9]]></category>
		<category><![CDATA[xforwarind on solaris]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=205</guid>
		<description><![CDATA[The &#8220;inetd&#8221; demon runs the telnet server. By default, the telnet is disabled in Solaris. It not recommended to login via telnet in an unsecured environment. However, in cases such as Xforwarding (click here) requirements, you need to get it up. Here is how to get it done. Check whether inet daemon is running. ps [...]]]></description>
			<content:encoded><![CDATA[<p>The &#8220;inetd&#8221; demon runs the telnet server. By default, the telnet is disabled in Solaris. It not recommended to login via telnet in an unsecured environment. However, in cases such as Xforwarding (<a href="http://presoon.com/blog/2010/11/18/access-solaris-gui-application-using-fedoralinux-veritas-admin-console-from-fedora/" target="_blank">click here</a>) requirements, you need to get it up. Here is how to get it done.</p>
<p>Check whether inet daemon is running.</p>
<pre><code>ps -ef | grep inetd</code></pre>
<p>Now edit the file /etc/inet/inetd.conf. Find the following lines</p>
<pre><code># TELNETD - telnet server daemon
telnet  stream  tcp6    nowait  root    /usr/sbin/in.telnetd    in.telnetd</code></pre>
<p>Make sure that &#8220;telnet&#8221; line is uncommented.</p>
<p>Now open the file /etc/inet/services. Uncomment the line which says telnet</p>
<pre><code>telnet          23/tcp</code></pre>
<p>Now you need to restart the inetd if it was running or you need to start it.</p>
<p>find the process id using</p>
<pre><code>ps -ef |grep inetd

kill -HUP &lt;processid&gt;</code></pre>
<p>to restart the daemon.</p>
<p>If the service was not started initially, start it using the following command</p>
<pre><code>/usr/sbin/inetd -s</code></pre>
<p>check with ps -ef whether the process is running. Now try to connect using telnet and it should work fine.</p>
<p>The telnet root login won&#8217;t work. To enable it make the changes given below.</p>
<p>Assign 644 permission to the file /etc/default/login</p>
<pre><code>chmod 644 /etc/default/login</code></pre>
<p>Edit the file to find the line</p>
<pre><code>CONSOLE=/dev/console</code></pre>
<p>Commend the above line. Now the telnet should work fine for root login too. PLEASE NOTE THAT ENABLING ROOT LOGIN IS UNSECURE FOR A PRODUCTION SYSTEM.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/11/19/how-to-enable-telnet-in-solaris-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access Solaris gui application using fedora/Linux (Veritas admin console from Fedora)</title>
		<link>http://presoon.com/blog/2010/11/18/access-solaris-gui-application-using-fedoralinux-veritas-admin-console-from-fedora/</link>
		<comments>http://presoon.com/blog/2010/11/18/access-solaris-gui-application-using-fedoralinux-veritas-admin-console-from-fedora/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 06:10:33 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[-nolisten tcp]]></category>
		<category><![CDATA[ssh X forwarding solaris]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=200</guid>
		<description><![CDATA[In older versions of Solaris, the X forwarding via SSH won&#8217;t work. In this case, we have go for telnet. Here I will explain how to access the Solaris X session via Fedora. By default, the fedora installation won&#8217;t allow the X session to listen on TCP. You can confirm this by checking the below [...]]]></description>
			<content:encoded><![CDATA[<p>In older versions of Solaris, the X forwarding via SSH won&#8217;t work. In this case, we have go for telnet. Here I will explain how to access the Solaris X session via Fedora.</p>
<p>By default, the fedora installation won&#8217;t allow the X session to listen on TCP. You can confirm this by checking the below command</p>
<pre><code>ps aux |grep -i xorg</code></pre>
<p>The output will be like</p>
<p>=============</p>
<p>root      1263  3.1  1.2  34572 15944 tty1     Ss+  08:14   4:54 /usr/bin/Xorg :0 -nr -verbose -nolisten tcp -auth /var/run/gdm/auth-for-gdm-PYoLoS/database vt1<br />
root     24778  0.0  0.0   4468   756 pts/3    S+   10:47   0:00 grep &#8211;color=auto -i xorg</p>
<p>=============</p>
<p>You can find in the options that -nolisten tcp is present. We need to ask the X session to listen via IP. This can be done by adding a directive in the file /etc/gdm/custom.conf</p>
<p>Under the &#8220;security&#8221; directive add DisallowTcp=false</p>
<pre><code>[security]
DisallowTCP=false</code></pre>
<p>Now logout and login back again. Check ps aux |grep -i xorg again and ensure that now the option -nolisten tcp doesn&#8217;t come up.</p>
<p>Now add the IP address of the remote Solaris server to the access list</p>
<pre><code>xhost &lt;IP address of the Solaris server&gt;</code></pre>
<p>Now login to the Solaris server using telnet.. SSH won&#8217;t work for X session.</p>
<pre><code>telnet &lt;IP address of the Solaris server&gt;</code></pre>
<p>enter the login credentials. Once you have logged in use the xterm to run any GUI softwares.</p>
<pre><code>xterm</code></pre>
<p>Window should now come up.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/11/18/access-solaris-gui-application-using-fedoralinux-veritas-admin-console-from-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Application unable to connect to internet LG GX200, Nimbuzz, ebuddy</title>
		<link>http://presoon.com/blog/2010/08/27/java-application-unable-to-connect-to-internet-lg-gx200-nimbuzz-ebuddy/</link>
		<comments>http://presoon.com/blog/2010/08/27/java-application-unable-to-connect-to-internet-lg-gx200-nimbuzz-ebuddy/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 08:13:05 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[LG GX200]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=196</guid>
		<description><![CDATA[Hi guys, I have come across a problem with the LG GX200 set. In fact, it is not a big issue. Heres the scenario, I have a Reliance sim in Slot 1 and Airtel in the Slot 2. The mobile office(unlimited connectivity) has been activated in the Airtel sim which is slot 2. The GPRS [...]]]></description>
			<content:encoded><![CDATA[<p>Hi guys,</p>
<p>I have come across a problem with the LG GX200 set. In fact, it is not a big issue.</p>
<p>Heres the scenario, I have a Reliance sim in Slot 1 and Airtel in the Slot 2. The mobile office(unlimited connectivity) has been activated in the Airtel sim which is slot 2.</p>
<p>The GPRS is working fine in the default browser. However, the Java applications are not able to connect. The network profile is also configured.</p>
<p>Menu &gt; Mystuff &gt; Games &amp; Apps &gt; Network Profile &gt; Sim2 &gt; (Mobile office was activated).</p>
<p>Eventhough you have configured the network profile, the Java applications won&#8217;t work. I think the software is checking with the sim in slot 1.</p>
<p>The fix is to interchange the SIMs in the modules. In my case, slot 1 with Airtel and Slot2 with Reliance. I think, the software guys might not have detected this as a bug.</p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/08/27/java-application-unable-to-connect-to-internet-lg-gx200-nimbuzz-ebuddy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install CSF Firewall on virtuozzo &#8211; Cannot enter into server after CSF installation VPS</title>
		<link>http://presoon.com/blog/2010/03/14/how-to-install-csf-firewall-on-virtuozzo-cannot-enter-into-server-after-csf-installation-vps/</link>
		<comments>http://presoon.com/blog/2010/03/14/how-to-install-csf-firewall-on-virtuozzo-cannot-enter-into-server-after-csf-installation-vps/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 23:03:04 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[cannot access vps after csf installation]]></category>
		<category><![CDATA[csf in vps]]></category>
		<category><![CDATA[iptables modules]]></category>
		<category><![CDATA[virtuzzo]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=186</guid>
		<description><![CDATA[CSF is a powerful Firewall for Linux and cPanel servers are here are the steps to get it working with Virtuozzo VPS Installation rm -fv csf.tgz wget http://www.configserver.com/free/csf.tgz tar -xzf csf.tgz cd csf sh install.sh After the installation you will need to customize CSF to run on VPS: edit /etc/sysconfig/iptables and add -A FORWARD -j [...]]]></description>
			<content:encoded><![CDATA[<p>CSF is a powerful Firewall for Linux and cPanel servers are here are the steps to get it working with Virtuozzo VPS</p>
<p><strong>Installation</strong></p>
<pre><code>rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh</code></pre>
<p><strong>After the installation you will need to customize CSF to run on VPS:</strong></p>
<p>edit /etc/sysconfig/iptables and add</p>
<pre><code>-A FORWARD -j ACCEPT -p all -s 0/0 -i venet0
-A FORWARD -j ACCEPT -p all -s 0/0 -o venet0
-A INPUT -i venet0 -j ACCEPT
-A OUTPUT -o venet0 -j ACCEPT</code></pre>
<p>create file /etc/csf/csfpre.sh and enter all the extra rules directly into it prefixed with &#8220;iptables&#8221; so the contents of that file should look something like:</p>
<pre><code>iptables -A INPUT -i venet0 -j ACCEPT
iptables -A OUTPUT -o venet0 -j ACCEPT
iptables -A FORWARD -j ACCEPT -p all -s 0/0 -i venet0
iptables -A FORWARD -j ACCEPT -p all -s 0/0 -o venet0</code></pre>
<p>edit /etc/csf/csf.conf file and add<br />
and search for</p>
<pre><code>ETH_DEVICE = ""

change to

ETH_DEVICE = "venet+"</code></pre>
<p>Restart</p>
<pre><code>/usr/sbin/csf -r</code></pre>
<p><strong>LOCKOUT ISSUES FOR CSF WHEN INSTALLED IN VPS. or  Cannot enter into server after CSF installation on VPS</strong></p>
<p>If the required IP table modules are not properly loaded to the container node, you may lockout yourself after the installation. If you have access to the main Hardware node, you can perform the following to get it up or ask your VPS provider to perform this on the Hardware (main) node.</p>
<p>Before enabling iptables on VPS, it needs to make sure that the iptables modules are enabled on the Hardware Node. In order to enable iptables modules on Hardware Node, edit /etc/sysconfig/iptables-config file on a Virtuozzo hardware node and look for the following parameter value: IPTABLES_MODULES=.  Edit it as the following.</p>
<pre><code>IPTABLES_MODULES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp”</code></pre>
<p>Also edit /etc/sysconfig/vz file on a hardware node and look for the following parameter value: IPTABLES= , change it to the following.</p>
<pre><code>IPTABLES=”ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp” </code></pre>
<p>Now your Hardware node is fine. You need to enable the iptable modules to the VPS nodes.<br />
(CID &#8212; container ID. You can find the value for each node by using the command vzlist -a)</p>
<pre><code>vzctl stop CID

vzctl set CID --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length  --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save

vzctl set CID --numiptent 2000 --save

vzctl start CID</code></pre>
<p>Now try entering into your node and restart CSF. It should start working fine.</p>
<p><strong>Descriptions and Functions</strong></p>
<p>======================</p>
<p><strong>csf+lfd  works on all Linux servers on the Operating Systems listed above, with or without cPanel</strong></p>
<p>This suite of scripts provides:</p>
<ul>
<li>Straight-forward SPI iptables firewall script</li>
<li>Daemon process that checks for login authentication failures for:
<ul>
<li>Courier imap, Dovecot, uw-imap, Kerio</li>
<li>openSSH</li>
<li>cPanel, WHM, Webmail (cPanel servers only)</li>
<li>Pure-pftd, vsftpd, Proftpd</li>
<li>Password protected web pages (htpasswd)</li>
<li>Mod_security failures (v1 and v2)</li>
<li>Suhosin failures</li>
<li>Exim SMTP AUTH</li>
<li>Custom login failures with separate log file and regular expression matching</li>
</ul>
</li>
<li>POP3/IMAP login tracking to enforce logins per hour</li>
<li>SSH login notification</li>
<li>SU login notification</li>
<li>Excessive connection blocking</li>
<li>WHM  configuration interface  (cPanel servers only) or through Webmin</li>
<li>WHM iptables report log  (cPanel servers only)</li>
<li>Easy upgrade between versions from within WHM  (cPanel servers only) or through Webmin</li>
<li>Easy upgrade between versions from shell</li>
<li>A  standard Webmin Module to configure csf is included in the distribution ready to install into Webmin &#8211; csfwebmin.tgz</li>
<li>Pre-configured to work on a cPanel server with all the standard cPanel ports open (cPanel servers only)</li>
<li>Auto-configures the SSH port if it&#8217;s non-standard on installation</li>
<li>Block traffic on unused server IP addresses &#8211; helps reduce the risk to your server</li>
<li>Alert when end-user scripts sending excessive emails per hour &#8211; for identifying spamming scripts</li>
<li>Suspicious process reporting &#8211; reports potential exploits running on the server</li>
<li>Excessive  user processes reporting</li>
<li>Excessive  user process usage reporting and optional termination</li>
<li>Suspicious file reporting &#8211; reports potential exploit files in /tmp and similar directories</li>
<li>Directory and file watching &#8211; reports if a watched directory or a file changes</li>
<li>Block traffic on the <a href="http://www.dshield.org/block_list_info.php" target="_blank">DShield Block List</a> and the <a href="http://www.spamhaus.org/drop/index.lasso" target="_blank">Spamhaus DROP List</a></li>
<li>BOGON packet protection</li>
<li>Pre-configured settings for Low, Medium or High firewall security (cPanel servers only)</li>
<li>Works with multiple ethernet devices</li>
<li>Server Security Check &#8211; Performs a basic security and settings check on the server (cPanel servers only)</li>
<li>Allow Dynamic	DNS IP addresses &#8211; always allow  your IP address even if it changes whenever you connect to the internet</li>
<li>Alert sent if server load average remains high for a specified length of time</li>
<li>mod_security log reporting (if installed)</li>
<li>Email relay tracking &#8211; tracks all email sent through the server  and issues alerts for excessive usage (cPanel servers only)</li>
<li>IDS (Intrusion Detection System) &#8211; the last line of detection alerts you to changes to system and application binaries</li>
<li>SYN Flood protection</li>
<li>Ping of death protection</li>
<li>Port Scan tracking and blocking</li>
<li>Permanent <em>and</em> Temporary (with TTL) IP blocking</li>
<li>Exploit checks</li>
<li>Account modification tracking &#8211; sends alerts if an account entry is modified, e.g. if the password is changed or the login shell</li>
<li>Shared syslog aware</li>
<li><span class="style1">New in v4: </span> Messenger Service &#8211; Allows you to redirect connection requests from blocked IP addresses to preconfigured text and html pages to inform the visitor that they have been blocked in the firewall. This can be particularly useful for those with a large user base and help process support requests more efficiently</li>
<li><span class="style1">New in v4: </span> Country Code blocking &#8211; Allows you to deny or allow access by country &#8211; <a href="http://www.ipdeny.com/" target="_blank">Powered by IPDENY.COM IP database</a></li>
<li><span class="style1">New in v4: </span> Port Flooding Detection &#8211; Per IP, per Port connection flooding detection and mitigation to help block DOS attacks</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/03/14/how-to-install-csf-firewall-on-virtuozzo-cannot-enter-into-server-after-csf-installation-vps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpMyAdmin &#8211; Error &#8220;cannot start session without errors&#8221;</title>
		<link>http://presoon.com/blog/2010/03/14/phpmyadmin-error-cannot-start-session-without-errors/</link>
		<comments>http://presoon.com/blog/2010/03/14/phpmyadmin-error-cannot-start-session-without-errors/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 22:23:38 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[session errors]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=182</guid>
		<description><![CDATA[cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. The usual error which comes up with phpmyadmin. The issue can either be due to the cPanel&#8217;s PHP or its session settings. Try the following fix Open up the file /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini Change the [...]]]></description>
			<content:encoded><![CDATA[<pre><code>cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.</code></pre>
<p>The usual error which comes up with phpmyadmin. The issue can either be due to the cPanel&#8217;s PHP or its session settings. Try the following fix</p>
<p>Open up the file /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini</p>
<p>Change the session path to /tmp</p>
<p>From</p>
<pre><code>session.save_handler = sqlite
session.save_path =/var/cpanel/userhomes/cpanelphpmyadmin/sessions</code></pre>
<p>To</p>
<pre><code>session.save_handler = files
session.save_path = /tmp </code></pre>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/03/14/phpmyadmin-error-cannot-start-session-without-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Awstats &#8220;update now&#8221; button shows blank page and cpanel error log shows &#8220;Out of Memory&#8221;</title>
		<link>http://presoon.com/blog/2010/02/27/awstats-update-now-button-shows-blank-page-and-cpanel-error-log-shows-out-of-memory/</link>
		<comments>http://presoon.com/blog/2010/02/27/awstats-update-now-button-shows-blank-page-and-cpanel-error-log-shows-out-of-memory/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 23:54:47 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Out of Memory!]]></category>
		<category><![CDATA[shows blank page]]></category>
		<category><![CDATA[white page Awstats]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=178</guid>
		<description><![CDATA[The cPanel error logs shows Out of Memory! when you click the &#8220;update now&#8221; button in Awstats. This usually happens when cPanel&#8217;s php is set with low memory. But in most of the cases this is not the issue. Go to WHM &#62; Tweak Settings &#62; &#8220;The maximum memory a cPanel process can use before [...]]]></description>
			<content:encoded><![CDATA[<p>The cPanel error logs shows Out of Memory! when you click the &#8220;update now&#8221; button in Awstats. This usually happens when cPanel&#8217;s php is set with low memory. But in most of the cases this is not the issue.</p>
<p>Go to WHM &gt; Tweak Settings &gt; &#8220;The maximum memory a cPanel process can use before it is killed off (in megabytes). Values less than 128 megabytes can not be specified. A value of &#8220;0&#8243; will disable the memory limits.&#8221;</p>
<p>Set this to 0 or a higher value..</p>
<p>In the Awstats case, the cPanel processes memory is getting exhausted.</p>
<p>This can be done also by editing the file /var/cpanel/cpanel.config</p>
<pre><code>maxmem=0
/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/02/27/awstats-update-now-button-shows-blank-page-and-cpanel-error-log-shows-out-of-memory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom php.ini for PHP CGI in cPanel.</title>
		<link>http://presoon.com/blog/2010/02/26/custom-php-ini-for-php-cgi-in-cpanel/</link>
		<comments>http://presoon.com/blog/2010/02/26/custom-php-ini-for-php-cgi-in-cpanel/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 22:06:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[custom php.ini]]></category>
		<category><![CDATA[php-cgi]]></category>
		<category><![CDATA[php.ini not working]]></category>
		<category><![CDATA[php_cgi]]></category>

		<guid isPermaLink="false">http://presoon.com/blog/?p=171</guid>
		<description><![CDATA[Hi guys, When PHP is compiled as CGI, you won&#8217;t be able to provide custom php flags in .htaccess or just simply add a php.ini if your home directory. To enable a custom php.ini for your domain running PHP as cgi, perform the following steps. Please note that I am considering that the server has [...]]]></description>
			<content:encoded><![CDATA[<p>Hi guys,</p>
<p>When PHP is compiled as CGI, you won&#8217;t be able to provide custom php flags in .htaccess or just simply add a php.ini if your home directory.</p>
<p>To enable a custom php.ini for your domain running PHP as cgi, perform the following steps.</p>
<p>Please note that I am considering that the server has PHP4 and PHP5 where PHP4 is default (dso)-not relevant and PHP5 (cgi)</p>
<p><strong>My username is &#8220;presoon&#8221; so my home directory will be &#8220;/home/presoon&#8221; (replace with yours)</strong></p>
<p>create a custom cgi script in your cgi-bin directory.</p>
<pre><code>vi /home/presoon/public_html/cgi-bin/php.cgi</code></pre>
<p>add the following contents.</p>
<pre><code>#!/bin/sh
exec /usr/local/cpanel/cgi-sys/php5 -c /home/presoon/public_html/</code></pre>
<p>You should have the custom php.ini at &#8220;/home/presoon/public_html/&#8221;</p>
<pre><code>chown presoon.presoon /home/presoon/public_html/cgi-bin/php.cgi
chmod 755 /home/presoon/public_html/cgi-bin/php.cgi</code></pre>
<p>Now to the .htaccess file at &#8220;/home/presoon/public_html/&#8221;<br />
Add the following</p>
<pre><code>AddHandler application/x-httpd-php5 .php
Action application/x-httpd-php5 /cgi-bin/php.cgi</code></pre>
<p>Please note that AddHandler given above is to change default php to PHP5. If you have only PHP5 which is compiled as CGI, you can remove the directive AddHandler from .htaccess.</p>
<p>Now the values given in your php.ini at /home/presoon/public_html/ should reflect you info page. <img src='http://presoon.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://presoon.com/blog/2010/02/26/custom-php-ini-for-php-cgi-in-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

