1)After reinstalling cpanel, first confiigure WHM.
2)Mount old drives
3)Take backup of the following.
/var/cpanel
/etc/passwd
/etc/shadow
/etc/group
/var/named
cp -rpf /var/cpanel /var/cpanel.bak
cp -rpf /etc/passwd /etc/passwd.bak
cp -rpf /etc/shadow /etc/shadow.bak
cp -rpf /etc/group /etc/group.bak
cp -rpf /var/named /var/named.bak
4)First restore /var/cpanel
cp -rpf /oldvar/cpanel/* /var/cpanel
5)Please take little care while doing this step
Take the backup of old /etc/passwd, /etc/shadow, /etc/group
Edit backup of old etc/passwd.
Remove the Entires which are currentlly present in new /etc/passwd
Save the file. cat /olddrive/etc/passwd.bkp >>/etc/passwd
do the same for shadow and group
Note:After doing the above step please make sure that you are …
Installing ionCube Loader:
1. Download the program and store it on your server using wget or FTP.
http://www.ioncube.com/loader_download.php
2. Unpack the program
tar -zxvf ioncube_loaders.tar.gz
3. cd ioncube
4. copy ioncube-install-assistant.php to a web directory such as your hosting directory and open it in your browser window.
cp ioncube-install-assistant.php /home/userdirectoryhere/www
Then open it http://www.yourdomain.com/ioncube-install-assistant.php
The output should be something similar to:
Analysis of your system configuration shows:
PHP Version 4.3.3
Operating System Linux
Threaded PHP No
php.ini file /usr/local/lib/php.ini
Required Loader ioncube_loader_lin_4.3.so
5. Now lets move the iconcube directory to a permanent location:
cd ..
mv ioncube /usr/local
6. …
APF with AntiDOS Installation :-
==================================
Login to your server through SSH as root user.
Before installation by the following steps,
please check whether it is already installed, and if so, please skip this
installation.
1. cd /usr/src or another temporary folder where you store your files.
2. wget http://www.rfxnetworks.com/downloads/apf-current.tar.gz
3. tar -xvzf apf-current.tar.gz
4. cd apf-0.9.6-1/ or whatever the latest version is.
5. Run the install file: ./install.sh
You will receive a message saying it has been installed
APF CONFIGURATION
==============
1) Change USE_DS=”0″ to USE_DS=”1″
2) Change the Value of IG_TCP_CPORTS to
IG_TCP_CPORTS=”21,22,25,26,53,80,110,143,465,953,993,995,2082,2083,2086,2087,2095,2096,3306,5666,3000_3500″
3) Change …
exim – number of connections
tail -1000 /var/log/exim_mainlog |grep ‘\[' |cut -d[ -f2 |cut -d] -f1|sort -n |uniq -c |sort -n
cppop
tail -1000 /var/log/maillog | grep host= | cut -d= -f2| cut -d” ” -f1|sort -n |uniq -c |sort -n
no of http connections
netstat -plan|grep :80|awk {‘print $5′}|cut -d: -f 1|sort|uniq -c|sort -nk 1
monitor server load and check which domain has attack
watch -n 5 ‘w; ls -alS /usr/local/apache/domlogs/ ‘
HTTP
netstat -pan | sort +4 | grep TIME_WAIT | awk ‘{print $5}’ | sed -e …