blocking ip

#!/bin/bash
echo ” “;
echo “USAGE :  /scripts/block_ipaddress ip1 ip2 ….”
echo ” “;
for i in $*
do
echo $i;
CHECK_IF_LOCALIP=0;
/sbin/ifconfig | grep $i > /dev/null;
if [ $? -ne $CHECK_IF_LOCALIP ]
then
{
FLAG=0;
grep $i /etc/sysconfig/iptables | grep DROP  > /dev/null;
if [ $? -ne $FLAG ]
then
printf ” \nBLOCKING ALL CONNECTIONS FROM  $i \t\n”;
iptables -I INPUT -p tcp -s $i -j DROP;
/etc/rc.d/init.d/iptables save;
printf “All connections from  $i is now blocked \t\n”;
else
printf ” \t\tIpaddress $i is already blocked \n”;
fi
}
else
echo ” Sorry, the ip $i cannot be blocked since this is a …

Read On »

Server Restore

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 …

Read On »

Installing ionCube Loader

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. …

Read On »

Apf-Bfd install.

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 …

Read On »

 Page 41 of 43  « First  ... « 39  40  41  42  43 »