<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<rss version="2.0">
<channel>
<title>..::LINUX-GUIDE::.. - Die f&amp;uuml;nf neuesten Artikel:</title>
<description>..::LINUX-GUIDE::.. Debian, redhat, suse,  confixx, cpanel, plesk, php, mysql, apache,</description>
<link>http://www.linux-guide.net</link>	<item>
		<title><![CDATA[ioncbe loader on cpanel]]></title>
		<description><![CDATA[1.  Download the latest loaders to your computer from <a target="_blank" href="http://www.ioncube.com/loaders.php">http://www.ioncube.com/loaders.php</a> and upload them to your webspace<br />
   2. Move the <span class="highlight">ioncube</span> folder to a permanent location by entering:<br />
      mv <span class="highlight">ioncube</span> /usr/local<br />
   3. Next, you need to locate the php.ini file, to do this enter:<br />
      locate php.ini<br />
   4. You should find it is in /usr/local/lib/php.ini.  Now that you know the location of php.ini you need to edit it.<br />
      pico /usr/local/lib/php.ini<br />
   5. Now find where other zend extentions are in the file.<br />
      ctrl + w: zend_extension<br />
   6. Paste in your new line for <span class="highlight">ioncube</span> loader<br />
      zend_extension = /usr/local/ioncube/ioncube_loader_lin_x.so (Replace x with your version of PHP eg. 4.4)<br />
   7. Save the changes<br />
      ctrl + X then Y and enter<br />
   8. Restart the web server to take effect.<br />
      /etc/init.d/httpd restart]]></description>
		<link>http://www.linux-guide.net/index.php?action=artikel&amp;cat=15&amp;id=692&amp;artlang=de</link>
		<pubDate>Tue, 20 Nov 2007 19:17:49 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[Backup an entire hard disk using dd command]]></title>
		<description><![CDATA[<p><font size="2">The ' dd ' command is one of the original Unix utilities and  should be in everyone's tool box. It can strip 
				headers, extract parts of binary files and write into the middle 
				of floppy disks; it is used by the Linux kernel <a id="KonaLink2" target="_new" class="kLink" style="text-decoration: underline ! important; position: static;" href="http://www.debianhelp.co.uk/ddcommand.htm#"><font color="#009900" style="color: rgb(0, 153, 0) ! important; font-family: Verdana; font-weight: 400; font-size: 13px; position: static;"><span class="kLink" style="border-bottom: 1px solid rgb(0, 153, 0); color: rgb(0, 153, 0) ! important; font-family: Verdana; font-weight: 400; font-size: 13px; position: static; padding-bottom: 1px; background-color: transparent;"></span><span class="kLink" style="border-bottom: 1px solid rgb(0, 153, 0); color: rgb(0, 153, 0) ! important; font-family: Verdana; font-weight: 400; font-size: 13px; position: static; padding-bottom: 1px; background-color: transparent;"></span></font></a>Makefiles to 
				make boot images. It can be used to copy and convert magnetic 
				tape formats, convert between ASCII and EBCDIC, swap bytes, and 
				force to upper and lowercase. <br />
				<br />
				For blocked I/O, the dd command has no competition in the 
				standard tool set. One could write a custom utility to do 
				specific I/O or formatting but, as dd is already available 
				almost everywhere, it makes sense to use it. <br />
				<br />
				Like most well-behaved commands, dd reads from its standard 
				input and writes to its standard output, unless a command line 
				specification has been given. This allows dd to be used in 
				pipes, and remotely with the rsh remote shell command. <br />
				<br />
				Unlike most commands, dd uses a keyword=value format for its 
				parameters. This was reputedly modeled after IBM System/360 JCL, 
				which had an elaborate DD 'Dataset Definition' specification for 
				I/O devices. A complete listing of all keywords is available 
				from GNU dd with <br />
				<br />
				# dd --help</font></p>
				<p><font size="2">For more options check dd
				<a href="http://www.die.net/doc/linux/man/man1/dd.1.html">man 
				page</a> <br />
				<br />
				Using dd you can create backups of an entire harddisk or just a 
				parts of it. This is also usefull to quickly copy installations 
				to similar machines. It will only work on disks that are exactly 
				the same in disk geometry, meaning they have to the same model 
				from the same brand.<br />
				<br />
				<b><font color="#cc0066">full hard disk copy<br />
				</font></b><br />
				dd if=/dev/hdx of=/dev/hdy<br />
				dd if=/dev/hdx of=/path/to/image<br />
				dd if=/dev/hdx | gzip &gt; /path/to/image.gz<br />
				<br />
				Hdx could be hda, hdb etc. In the second example gzip is used to 
				compress the image if it is really just a backup. <br />
				<br />
				<font color="#cc0066"><b>Restore Backup of hard disk copy<br />
				</b></font><br />
				dd if=/path/to/image of=/dev/hdx<br />
				<br />
				gzip -dc /path/to/image.gz | dd of=/dev/hdx <br />
				<br />
				<font color="#cc0066"><b>MBR backup</b></font><br />
				<br />
				In order to backup only the first few bytes containing the MBR 
				and the partition table you can use dd as well.<br />
				<br />
				dd if=/dev/hdx of=/path/to/image count=1 bs=512 <br />
				<br />
				<font color="#cc0066"><b>MBR restore</b></font><br />
				<br />
				dd if=/path/to/image of=/dev/hdx</font></p>
				<p><font size="2">Add "count=1 bs=446" to exclude the partition 
				table from being written to disk. You can manually restore the 
				table.</font></p>]]></description>
		<link>http://www.linux-guide.net/index.php?action=artikel&amp;cat=10&amp;id=108&amp;artlang=de</link>
		<pubDate>Sat, 28 Jul 2007 23:05:04 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[Zend Optimizer]]></title>
		<description><![CDATA[Der Zend Optimizer ist ein Beschleuniger für PHP-Skripte. Dies
verbessert zum einen die Performance von vielen PHP Skripten und senkt
auch die von PHP Skripten entstehende Serverlast.<br />
<br />
Zusätzlich dazu gibt es Skripte welche mit Zend verschlüsselt sind.
Diese können nur genutzt werden, wenn der Zend Optimizer installiert
ist.<br />
<ol style="list-style-type: decimal;"><li>Loggen Sie sich als Root per SSH auf Ihren Server ein</li><li>Führen Sie folgenden Befehl aus:<br />
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Zitat:</div>
	<table width="100%" cellspacing="0" cellpadding="6" border="0">
	<tbody><tr>
		<td class="alt2" style="border: 1px inset ;">
			
				/scripts/installzendopt
			
		</td>
	</tr>
	</tbody></table>
</div></li><li>Folgenden Sie den Anweisungen des Skriptes</li></ol>]]></description>
		<link>http://www.linux-guide.net/index.php?action=artikel&amp;cat=24&amp;id=26&amp;artlang=de</link>
		<pubDate>Sat, 28 Jul 2007 22:50:54 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[First aid for DDOS attack on port 80]]></title>
		<description><![CDATA[We can use the following steps to recover our server from a DDOS attack
on the port 80. To do this you must have logged into the server as a
root user.<br />
<br />
<br />
<br />
<font size="4">Step 1 : Install/Configure APF firewall<br />
</font><br />
<br />
<font color="Navy">a) If there are no firewalls installed on the server please install the same,<br />
you will get the steps and directions from the following site.<br />
<br />
<a target="_blank" href="http://www.webhostgear.com/61.html">http://www.webhostgear.com/61.html</a><br />
<br />
<br />
b) Turn on the antidos option (USE_AD) in the APF conf file<br />
<br />
# vi /etc/apf/conf.apf<br />
<br />
USE_AD = 1</font><br />
<br />
<br />
<br />
<font size="4">Step 2 : Install/Configure mod_evasive (for Apache 1.3x)</font><br />
<br />
<font color="Navy">mod_evasive and mod_dosevasive are the same<br />
<br />
a) Install mod_evasive<br />
<br />
# wget <a target="_blank" href="http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz">http://www.zdziarski.com/projects/mo..._1.10.1.tar.gz</a><br />
# tar -xzvf mod_evasive_1.10.1.tar.gz<br />
# cd mod_evasive<br />
<br />
# /usr/local/apache/bin/apxs -i -a -c mod_evasive.c<br />
# /etc/init.d/httpd restart<br />
<br />
<br />
b) Also include the following lines in the apache conf file<br />
<br />
# vi /usr/local/apache/conf/httpd.conf<br />
<br />
-------------------------------------------------<br />
&lt;IfModule mod_evasive.c&gt;<br />
    DOSHashTableSize    3097<br />
    DOSPageCount        2<br />
    DOSSiteCount        50<br />
    DOSPageInterval     1<br />
    DOSSiteInterval     1<br />
    DOSBlockingPeriod   10<br />
&lt;/IfModule&gt;<br />
-------------------------------------------------<br />
<br />
<br />
c) Restart the webserver<br />
<br />
# /etc/init.d/httpd restart<br />
</font><br />
<br />
<br />
<br />
<br />
<font size="4">Step 3 : Install mod_security</font><br />
<br />
<font color="Navy">Normally we can find/install this module from WHM<br />
      WHM &gt;&gt; cPanel &gt;&gt; Addon Modules &gt;&gt; Select "modsecurity " &gt;&gt;save<br />
 <br />
</font><br />
<br />
<br />
<br />
<br />
<font size="4">Step 4 : Blocking IPs</font><br />
<br />
<font color="Navy">a) Find the IPs those have established a connection with the server<br />
<br />
(The following command is the better one to get the IPs, as this will sort the IPs<br />
according to the number of connections).<br />
<br />
<br />
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n<br />
<br />
<br />
b) Block them using IPTABLES<br />
<br />
# iptables -I INPUT -s 218.92.207.28 -j DROP<br />
# service iptables save<br />
# service iptables restart<br />
<br />
<br />
c) Block them on APF too<br />
<br />
# vi /etc/apf/deny_hosts.rules <br />
     &lt;Add the IPs at the end&gt;<br />
<br />
# service apf restart</font><br />
<br />
<br />
<br />
<br />
<font size="4">Step 5 : Optimizing the httpd.conf file</font><br />
<br />
<font color="Navy"># vi /usr/local/apache/conf/httpd.conf<br />
<br />
Change the bellow options as follows, original values are shown in the <br />
bracket.<br />
<br />
MaxKeepAliveRequests 50 (100)<br />
KeepAliveTimeout 60 (30)<br />
<br />
<br />
Also edit the following options too, according to the situation.<br />
<br />
Timeout<br />
KeepAliv<br />
MinSpareServers<br />
MaxSpareServers<br />
MaxClients</font><br />
<br />
<br />
<br />
<br />
<font size="4">Step 6 : Install/Configure 3rd party DDOS prevention tools</font><br />
<br />
<font color="Navy">We can also use the most trusting 3rd party script 'DDoS-Deflate' for preventing DDOS attack effectively.<br />
Steps to install this script are as follows.<br />
<br />
# wget <a target="_blank" href="http://www.inetbase.com/scripts/ddos/install.sh">http://www.inetbase.com/scripts/ddos/install.sh</a><br />
# sh install.sh<br />
<br />
Add the script '/usr/local/ddos/ddos.sh' to cron as follows<br />
<br />
# crontab -e<br />
<br />
*/5 * * * * /usr/local/ddos/ddos.sh &gt;/dev/null 2&gt;&amp;1<br />
</font><br />
<br />
<br />
<br />
<br />
<font size="4">Step 7 : Suspend websites</font><br />
<font color="Navy"><br />
Check the bandwidth usage of all the domains and suspend the high bandwidth consuming domains for a while<br />
</font><br />
<br />
<br />
<br />
<br />
<font size="5">PERMANENT WAY TO FIX THE DDOS ATTACK</font><br />
<br />
<font color="Navy">As we all know the softwares have its own
limitations for preventing against DDOS attack, we can follow these
steps to cure it permanently.<br />
<br />
1. Ask the NOC for attaching Cisco Guard on the server for 24 hours<br />
   (Normally this service is free from most NOCs)<br />
<br />
2. Attach a hardware firewall for the server<br />
</font><br />
<br />
<br />
Hope this will help you in such a situation :-)]]></description>
		<link>http://www.linux-guide.net/index.php?action=artikel&amp;cat=8&amp;id=107&amp;artlang=de</link>
		<pubDate>Mon, 02 Jul 2007 22:11:11 GMT</pubDate>
	</item>
	<item>
		<title><![CDATA[A Beginner's Guide to Securing Your Server]]></title>
		<description><![CDATA[<p>A Beginner's Guide to Securing Your Server  Part 1 of 3  (Security Inside WHM/CPanel)<br />
<br />
<br />
These are items inside of WHM/Cpanel that should be changed to secure your server.<br />
<br />
<br />
<br />
Goto <b>Server Setup</b> =&gt;&gt; <b>Tweak Settings</b><br />
<br />
<br />
	Check the following items...<br />
<br />
<br />
	Under <b>Domains</b><br />
<br />
		Prevent users from parking/adding on common internet domains. (ie hotmail.com, aol.com)<br />
		<br />
<br />
	Under <b>Mail</b><br />
<br />
		Attempt to prevent pop3 connection floods<br />
<br />
		Default catch-all/default address behavior for new accounts - blackhole<br />
<br />
<br />
	Under <b>System</b><br />
<br />
		Use jailshell as the default shell for all new accounts and modified accounts<br />
<br />
<br />
<br />
Goto <b>Server Setup</b> =&gt;&gt; <b>Tweak Security</b><br />
<br />
	Enable <b>php open_basedir</b> Protection<br />
<br />
	Enable <b>mod_userdir</b> Protection<br />
<br />
	Disabled Compilers for unprivileged users.<br />
<br />
<br />
<br />
Goto <b>Server Setup</b> =&gt;&gt; <b>Manage Wheel Group Users</b><br />
<br />
	Remove all users except for root and your main account from the wheel group.<br />
<br />
<br />
<br />
Goto <b>Server Setup</b> =&gt;&gt; <b>Shell Fork Bomb Protection</b><br />
<br />
	Enable <b>Shell Fork Bomb/Memory Protection</b><br />
<br />
<br />
<br />
When setting up Feature Limits for resellers in <b>Resellers</b> =&gt;&gt; <b>Reseller Center</b>, under <b>Privileges</b> always disable <b>Allow Creation of Packages with Shell Access</b> and enable <b>Never allow creation of accounts with shell access</b>; under <b>Root Access</b> disable <b>All Features</b>. <br />
<br />
<br />
<br />
Goto <b>Service Configuration</b> =&gt;&gt; <b>FTP Configuration</b><br />
<br />
	Disable Anonymous FTP<br />
<br />
<br />
<br />
Goto <b>Account Functions</b> =&gt;&gt; <b>Manage Shell Access</b><br />
<br />
	Disable Shell Access for all users (except yourself)<br />
<br />
<br />
Goto <b>Mysql</b> =&gt;&gt; <b>MySQL Root Password</b><br />
<br />
	Change root password for MySQL<br />
<br />
<br />
<br />
Goto <b>Security</b> and run <b>Quick Security Scan</b> and <b>Scan for Trojan Horses</b> often. The following and similar items are not Trojans:<br />
<br />
	/sbin/depmod<br />
	/sbin/insmod<br />
	/sbin/insmod.static<br />
	/sbin/modinfo<br />
	/sbin/modprobe<br />
	/sbin/rmmod</p>
These are measures that can be taken to secure your server, with SSH access.<br />
<br />
<br />
<b>Udate OS, Apache and CPanel to the latest stable versions</b>. <br />
<br />
This can be done from WHM/CPanel.<br />
<br />
<br />
<br />
<b>Restrict SSH Access</b><br />
<br />
<br />
To restrict and secure SSH access, bind sshd to a single IP that is
different than the main IP to the server, and on a different port than
port 22.<br />
<br />
<br />
SSH into server and login as root.<br />
<br />
<b>Note:</b> You can download Putty by  <a href="http://www.chiark.greenend.org.uk/%7Esgtatham/putty/download.html" target="_blank">Clicking Here</a>. It's a clean running application that will not require installation on Windows-boxes.<br />
<br />
<br />
At command prompt type: <b>pico /etc/ssh/sshd_config</b><br />
<br />
Scroll down to the section of the file that looks like this:<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 98px; text-align: left;">#Port 22<br />#Protocol 2, 1<br />#ListenAddress 0.0.0.0<br />#ListenAddress ::</pre>
</div>
<!-- END TEMPLATE: bbcode_code --><br />
Uncomment and change <br />
<br />
<b>#Port 22</b> <br />
<br />
to look like <br />
<br />
<b>Port 5678</b>  (choose your own 4 to 5 digit port number (49151 is the highest port number)<br />
<br />
<br />
Uncomment and change <br />
<br />
<b>#Protocol 2, 1</b><br />
<br />
to look like <br />
<br />
<b>Protocol 2</b><br />
<br />
<br />
Uncomment and change <br />
<br />
<b>#ListenAddress 0.0.0.0</b><br />
<br />
to look like <br />
<br />
<b>ListenAddress 123.123.123.15</b>  (use one of your own IP Addresses that has been assigned to your server)<br />
<br />
<br />
<b>Note 1:</b> If you would like to disable direct Root Login, scroll down until you find <br />
<br />
<b>#PermitRootLogin yes</b><br />
<br />
and uncomment it and make it look like <br />
<br />
<b>PermitRootLogin no</b><br />
<br />
Save by pressing <b>Ctrl o</b> on your keyboard, and then exit by pressing <b>Ctrl x</b> on your keyboard.<br />
<br />
<br />
<b>Note 2:</b> You can also create a custome nameserver specifically
for your new SSH IP address. Just create one called something like
ssh.xyz.com or whatever. Be sure to add an A address to your zone file
for the new nameserver.<br />
<br />
<br />
Now restart SSH<br />
<br />
At command prompt type: [b]/etc/rc.d/init.d/sshd restart[b]<br />
<br />
<br />
Exit out of SSH, and then re-login to SSH using the new IP or nameserver, and the new port.<br />
<br />
<br />
<b>Note:</b> If you should have any problems, just Telnet into your
server, fix the problem, then SSH in again. Telnet is a very unsecure
protocol, so change your root password after you use it.<br />
<br />
<br />
<br />
<br />
<b>Disable Telnet</b><br />
<br />
To disable telnet, SSH into server and login as root.<br />
<br />
At command prompt type: <b>pico -w /etc/xinetd.d/telnet</b><br />
<br />
change  <b>disable = no</b>   to   <b>disable = yes</b><br />
<br />
Save and Exit<br />
<br />
At command prompt type: <b>/etc/init.d/xinetd restart</b><br />
<br />
<br />
<br />
<br />
<b>Server e-mail everytime someone logs in as root</b><br />
<br />
To have the server e-mail you everytime someone logs in as root, SSH into server and login as root.<br />
<br />
At command prompt type: <b>pico .bash_profile</b><br />
<br />
Scroll down to the end of the file and add the following line:<br />
<br />
<b>echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | awk '{print $6}'`" <a href="mailto:your@email.com">your@email.com</a></b><br />
<br />
Save and exit. <br />
<br />
<br />
<br />
<br />
<b>Set an SSH Legal Message</b><br />
<br />
To an SSH legal message, SSH into server and login as root.<br />
<br />
At command prompt type: <b>pico /etc/motd</b><br />
<br />
Enter your message, save and exit.<br />
<br />
<b>Note:</b> I use the following message...<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 130px; text-align: left;">ALERT! You are entering a secured area! Your IP and login information<br />have been recorded. System administration has been notified.<br /><br />This system is restricted to authorized access only. All activities on<br />this system are recorded and logged. Unauthorized access will be fully<br />investigated and reported to the appropriate law enforcement agencies.</pre>
</div>
<!-- END TEMPLATE: bbcode_code -->Now everytime someone logs in as root, they will see this message... go ahead a try it.<br />
<br />
<br />
<br />
<br />
<b>Disable Shell Accounts</b><br />
<br />
To disable any shell accounts hosted on your server SSH into server and login as root.<br />
<br />
At command prompt type: <b>locate shell.php</b><br />
<br />
Also check for:<br />
<br />
<b>locate irc<br />
locate eggdrop<br />
locate bnc<br />
locate BNC<br />
locate ptlink<br />
locate BitchX<br />
locate guardservices<br />
locate psyBNC<br />
locate .rhosts</b>  <br />
<br />
<br />
<b>Note:</b> There will be several listings that will be OS/CPanel related. Examples are<br />
<br />
/home/cpapachebuild/buildapache/php-4.3.1/ext/ircg<br />
/usr/local/cpanel/etc/sym/eggdrop.sym<br />
/usr/local/cpanel/etc/sym/bnc.sym<br />
/usr/local/cpanel/etc/sym/psyBNC.sym<br />
/usr/local/cpanel/etc/sym/ptlink.sym<br />
/usr/lib/libncurses.so<br />
/usr/lib/libncurses.a<br />
etc.<br />
<br />
<br />
<br />
<br />
<b>Disable identification output for Apache</b> <br />
<br />
To disable the version output for proftp, SSH into server and login as root.<br />
<br />
At command prompt type: <b>pico /etc/httpd/conf/httpd.conf</b><br />
<br />
<br />
Scroll (way) down and change the following line to<br />
<br />
ServerSignature Off <br />
<br />
<br />
Restart Apache<br />
<br />
At command prompt type: <b>/etc/rc.d/init.d/httpd restart</b>
		<!-- / message -->
	
		
		
		
		
		
		
		
		
		
	
		<div align="right" style="margin-top: 10px;">
			<!-- controls -->     </div>
		
	<!-- post 142236 popup menu -->
<div class="vbmenu_popup" id="postmenu_142236_menu" style="display: none;">
	<table cellspacing="1" cellpadding="4" border="0">
	<tbody><tr>
		<td class="thead">000000000</td>
	</tr>
	
		<tr><td class="vbmenu_option"><a href="http://forums.cpanel.net/member.php?u=33199">View Public Profile</a></td></tr>
	
	
		<tr><td class="vbmenu_option"><a href="http://forums.cpanel.net/private.php?do=newpm&u=33199" rel="nofollow">Send a private message to 000000000</a></td></tr>
	
	
	
		<tr><td class="vbmenu_option"><a href="http://reseller-dot.com/">Visit 000000000's homepage!</a></td></tr>
	
	
		<tr><td class="vbmenu_option"><a href="http://forums.cpanel.net/search.php?do=finduser&u=33199" rel="nofollow">Find all posts by 000000000</a></td></tr>
	
	
	<tr><td class="vbmenu_option"><a href="http://forums.cpanel.net/profile.php?do=addlist&userlist=buddy&u=33199">Add 000000000 to Your Buddy List</a></td></tr>
	
	
	</tbody></table>
</div>
<!-- / post 142236 popup menu --><!-- END TEMPLATE: postbit --><!-- BEGIN TEMPLATE: spacer_close --><!-- / close content container --><!-- END TEMPLATE: spacer_close --><!-- / post #142236 --><!-- END TEMPLATE: postbit_wrapper --><!-- BEGIN TEMPLATE: postbit_wrapper --><!-- post #142237 --><!-- BEGIN TEMPLATE: spacer_open --><!-- open content container --><!-- END TEMPLATE: spacer_open --><!-- this is not the last post shown >
	
	








	
	










	





	
		


<!-- BEGIN TEMPLATE: postbit -->



	
		<div class="normal" style="float: right;"><a href="http://forums.cpanel.net/showpost.php?p=142237&postcount=3" target="new" rel="nofollow" id="postcount142237" name="3"><strong></strong></a></div><b>Install chkrootkit</b><br />
<br />
To install chrootkit, SSH into server and login as root.<br />
<br />
At command prompt type: <b>cd /root/</b><br />
<br />
At command prompt type: <b>wget <a href="ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz" target="_blank">ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz</a></b><br />
<br />
At command prompt type: <b>tar xvzf chkrootkit.tar.gz</b> <br />
<br />
At command prompt type: <b>cd chkrootkit-0.44</b><br />
<br />
At command prompt type: <b>make sense</b><br />
<br />
<br />
To run chkrootkit<br />
<br />
At command prompt type: <b>/root/chkrootkit-0.44/chkrootkit</b><br />
<br />
Make sure you run it on a regular basis, perhaps including it in a cron job. <br />
<br />
<br />
<br />
<br />
<b>Install APF Firewall</b><br />
<br />
To install APF, SSH into server and login as root.<br />
<br />
At command prompt type: <b>cd /root/</b><br />
<br />
At command prompt type: <b>wget <a href="http://www.rfxnetworks.com/downloads/apf-current.tar.gz" target="_blank">http://www.rfxnetworks.com/downloads/apf-current.tar.gz</a></b><br />
<br />
At command prompt type: <b>tar -xvzf apf-current.tar.gz</b><br />
<br />
At command prompt type: <b>rm -f apf-current.tar.gz</b><br />
<br />
At command prompt type: <b>cd apf-0.9.4-6</b><br />
<br />
At command prompt type: <b>sh ./install.sh</b><br />
<br />
<br />
After APF has been installed, you need to edit the configuration file.<br />
<br />
At command prompt type: <b>cd /etc/apf</b><br />
<br />
At command prompt type: <b>pico -w conf.apf</b><br />
<br />
<br />
Scroll down and find <br />
<br />
<b>USE_DS="0"</b><br />
<br />
change it to<br />
<br />
<b>USE_DS="1"</b><br />
<br />
<br />
Now scroll down and configure the Ports. The following ports are required for CPanel:<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 66px; text-align: left;">Common ingress (inbound) TCP ports<br />IG_TCP_CPORTS="21,22,25,53,80,110,143,465,953,993,995,2082,2083,2084,2086,2087,2095,2096,3306,6666,7786,3000_3500"</pre>
</div>
<!-- END TEMPLATE: bbcode_code --><b>Note:</b> If you changed the port for SSH, be sure to include that port and remove port 22.<br />
<br />
-----<br />
21 FTP (TCP)<br />
22 SSH (TCP)<br />
25 SMTP (TCP)<br />
53 DNS - Domain Name Server (TCP)<br />
80 HTTP (TCP)<br />
110 POP3 (TCP)<br />
143 IMAP (TCP)<br />
443 HTTPS (TCP)<br />
465 sSMTP (TCP)<br />
953 ??BIND?? <br />
993 IMAP4 protocol over TLS/SSL (TCP)<br />
995 POP3 protocol over TLS/SSL (was spop3) (TCP)<br />
2082 CPANEL (<a href="http://sitename.com:2082/" target="_blank">http://sitename.com:2082</a>) (TCP)<br />
2083 CPANEL SSL (<a href="https://sitename.com:2083/" target="_blank">https://sitename.com:2083</a>) (TCP)<br />
2084 entropychat server (disable from CPANEL service manager if not used) (TCP)<br />
2086 WHM (<a href="http://sitename.com:2086/" target="_blank">http://sitename.com:2086</a>) (TCP)<br />
2087 WHM SSL (<a href="https://sitename.com:2087/" target="_blank">https://sitename.com:2087</a>) (TCP)<br />
2095 WebMail (<a href="http://sitename.com:2095/" target="_blank">http://sitename.com:2095</a>) (TCP)<br />
2096 WebMail SSL (<a href="https://sitename.com:2096/" target="_blank">https://sitename.com:2096</a>) <br />
3306 mySQL remote access (TCP)<br />
6666 Melange chat Server (disable from CPANEL service manager if not used) (TCP)<br />
7786 Interchange (TCP)<br />
3000_3500<br />
-----<br />
5100 for ASP,<br />
8080 and 8443 for JSP if you use them.<br />
-----<br />
<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 66px; text-align: left;">Common ingress (inbound) UDP ports<br />IG_UDP_CPORTS="53,6277</pre>
</div>
<!-- END TEMPLATE: bbcode_code -->-----<br />
53 DNS - Domain Name Server<br />
6277 SpamAssassin / DCC (email scanning)<br />
-----<br />
<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 66px; text-align: left;">Common ICMP (inbound) types<br />IG_ICMP_TYPES="3,5,11,0,30,8"</pre>
</div>
<!-- END TEMPLATE: bbcode_code -->-----<br />
0 Echo Reply<br />
3 Destination Unreachable<br />
5 Destination Unreachable<br />
8 Echo<br />
11 Time Exceeded<br />
30 Traceroute<br />
-----<br />
<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 66px; text-align: left;">Common egress (outbound) TCP ports<br />EG_TCP_CPORTS="21,25,37,53,80,110,113,#123,443,43,873,953,2089,2703,3306"</pre>
</div>
<!-- END TEMPLATE: bbcode_code -->-----<br />
21 FTP<br />
25 SMTP<br />
37 Required for CPANEL Licensing<br />
53 DNS - Domain Name Server<br />
80 HTTP<br />
110 POP3 (if you have scripts that need to retrieve email via POP, e.g. HelpDesk)<br />
113 Authentication Protocol (AUTH)<br />
123 NTP (Network Time)<br />
443 HTTPS<br />
43 WHOIS<br />
873 rsync  (CPanel updates)<br />
953 BIND ??<br />
2089 Required for CPANEL Licensing<br />
2703 Razor (email scanning)<br />
3306 mySQL remote access<br />
-----<br />
<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 66px; text-align: left;">Common egress (outbound) UDP ports<br />EG_UDP_CPORTS="20,21,53,873,953,6277"</pre>
</div>
<!-- END TEMPLATE: bbcode_code -->-----<br />
20 ftp-data<br />
21 FTP<br />
53 DNS - Domain Name Server<br />
873 rsync<br />
953 BIND ??<br />
6277 SpamAssassin / DCC (email scanning)<br />
-----<br />
<br />
<br />
<!-- BEGIN TEMPLATE: bbcode_code -->
<div style="margin: 5px 20px 20px;">
	<div class="smallfont" style="margin-bottom: 2px;">Code:</div>
	<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 640px; height: 66px; text-align: left;">Common ICMP (outbound) types<br />EG_ICMP_TYPES="all"</pre>
</div>
<!-- END TEMPLATE: bbcode_code --><br />
<br />
Save the changes then exit.<br />
<br />
<br />
To start APF<br />
<br />
At command prompt type: <b>/usr/local/sbin/apf -s</b><br />
<br />
APF commands are:<br />
<br />
-s   start <br />
-r   restart <br />
-f   flush - stop <br />
-l   list <br />
-st   status <br />
-a HOST   allow HOST<br />
-d HOST   deny HOST<br />
<br />
<br />
Log out of SSH and then login again. <br />
<br />
<br />
After you are sure everything is working fine, change the DEV option<br />
<br />
At command prompt type: <b>cd /etc/apf</b><br />
<br />
At command prompt type: <b>pico -w conf.apf</b><br />
<br />
<br />
Scroll down and find <br />
<br />
<b>DEVM="1"</b><br />
<br />
change it to<br />
<br />
<b>DEVM="0"</b><br />
<br />
<br />
Save changes, exit and then restart firewall,<br />
<br />
At command prompt type: <b>/usr/local/sbin/apf -r</b><br />
<br />
<br />
<br />
<br />
<b>Install BFD</b> (Brute Force Detection)<br />
<br />
To install BFD, SSH into server and login as root.<br />
<br />
At command prompt type: <b>cd /root/</b><br />
<br />
At command prompt type: <b>wget <a href="http://www.rfxnetworks.com/downloads/bfd-current.tar.gz" target="_blank">http://www.rfxnetworks.com/downloads/bfd-current.tar.gz</a></b><br />
<br />
At command prompt type: <b>tar -xvzf bfd-current.tar.gz</b><br />
<br />
At command prompt type: <b>cd bfd-0.4</b><br />
<br />
At command prompt type: <b>./install.sh</b><br />
<br />
<br />
After BFD has been installed, you need to edit the configuration file.<br />
<br />
At command prompt type: <b>pico /usr/local/bfd/conf.bfd</b><br />
<br />
<br />
Under <b>Enable brute force hack attempt alerts:</b><br />
<br />
Find <br />
<br />
<b>ALERT_USR="0"</b> <br />
<br />
and change it to <br />
<br />
<b>ALERT_USR="1"</b><br />
<br />
<br />
Find <br />
<br />
<b>EMAIL_USR="root"</b> <br />
<br />
and change it to <br />
<br />
<b>EMAIL_USR="your@email.com"</b><br />
<br />
<br />
Save the changes then exit.<br />
<br />
<br />
To start BFD<br />
<br />
At command prompt type: <b>/usr/local/sbin/bfd -s</b><br />
<br />
<br />
<br />
<br />
<b>Modify LogWatch</b><br />
<br />
Logwatch is a customizable log analysis system. It parses through your
system's logs for a given period of time and creates a report analyzing
areas that you specify, in as much detail as you require. Logwatch is
already installed on most CPanel servers.<br />
<br />
<br />
To modify LogWatch, SSH into server and login as root.<br />
<br />
At command prompt type: <b>pico -w /etc/log.d/conf/logwatch.conf</b> <br />
<br />
<br />
Scroll down to<br />
<br />
<b>MailTo = root</b><br />
<br />
and change to<br />
<br />
<b>Mailto = <a href="mailto:your@email.com">your@email.com</a></b><br />
<br />
Note: Set the e-mail address to an offsite account incase you get hacked.<br />
<br />
<br />
Now scroll down to <br />
<br />
<b>Detail = Low</b><br />
<br />
Change that to Medium, or High...<br />
<br />
<b>Detail = 5</b>   or   <b>Detail = 10</b><br />
<br />
Note: High will give you more detailed logs with all actions. <br />
<br />
<br />
Save and exit.
		<!-- / message -->
	
		
		
		
		
		
		
		
		
		
	
		<div align="right" style="margin-top: 10px;">
			<!-- controls -->
			
			
			
				</div>]]></description>
		<link>http://www.linux-guide.net/index.php?action=artikel&amp;cat=8&amp;id=103&amp;artlang=de</link>
		<pubDate>Fri, 29 Jun 2007 23:19:01 GMT</pubDate>
	</item>
</channel>
</rss>