for i in `ps ax | grep D | awk {‘print $1’}`;do kill -9 $(cat /proc/${i}/status | grep PPid | awk {‘print $2’});done
Month: September 2008
To kill Zombie process
for i in `ps ax | grep Z | awk {‘print $1’}`;do kill -9 $(cat /proc/${i}/status | grep PPid | awk {‘print $2’});done
To find ddos attack
netstat -an |grep 80
netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nk 1
netstat -plan|grep :25|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nk 1
watch -n 5 ‘w; ls -alS /usr/local/apache/domlogs/ ‘
Top memory consuming processes
ps aux | head -1;ps aux –no-headers| sort -rn +3 | head
Number of exim connections
tail -1000 /var/log/exim_mainlog |grep ‘\[‘ |cut -d[ -f2 |cut -d] -f1|sort -n |uniq -c |sort -n
To find cppop attack
tail -1000 /var/log/maillog | grep host= | cut -d= -f2| cut -d” ” -f1|sort -n |uniq -c |sort -n
To find number of httpd connections
netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1|sort|uniq -c|sort -nk 1
or
netstat -pan | sort +4 | grep TIME_WAIT | awk ‘{print $5}’ | sed -e s/’:.*’//g | sort | uniq -c | sort -k 1 -nr | head -n 20
Script to search any hacking or malicious script
VECTORS=”r57sh c99sh h00ly 0wn3d rst.void.ru”
VECTORS_FINAL=$(echo $VECTORS | sed ‘s/\ /\|/g’)
find /home/*/public_html/ -type f -exec grep -Eil “$VECTORS_FINAL” {} \; >> vresult
Park domain error
Remove the entry of that park domain from these files and try to park the domain again.
/var/cpanel/users
/etc/httpd/conf/httpd.conf
/etc/localdomains
/etc/userdomains
/etc/valiases/
/etc/vdomainaliases
/var/named
/etc/named.conf
/etc/passwd
/etc/shadow
/etc/trueuserdomains
/etc/trueuserowners
/etc/vfilters
/etc/vftp
/etc/vmail
Outllook configuration
Follow the below instructions for configuring the outlook 2003.
1. In outlook, select Tools/Email accounts
2. On the E-mail Accounts wizard window, select “Add a new e-mail account” and click Next.
3. For your server type, select “POP3” and click Next.
4. On the Internet E-mail Settings (POP3) window, enter your information as follows:
Your Name
Enter your first and last name.
E-mail Address
Enter your e-mail address.
User Name
Enter your e-mail address, again.
Password
Enter the password you set up for your e-mail account.
Incoming mail server (POP3)
Enter mail.yourdomain.com
Outgoing mail server (SMTP)
Enter mail.yourdomain.com
Click “More Settings.”
5. On the Internet E-mail Settings window, select the “Outgoing Server” tab.
6. Select “My outgoing server (SMTP) requires authentication.”
7. Click the Use same as my incoming mail server button
8. Click the Advanced Tab
9. Change the “Outgoing server (SMTP)” port to 25. If your ISP blocks access to port 25 you can use port 26.
10. Click OK.
11. Click Next.
12. Click Finish.