COMMAND TO DROP USER:
Login into SQl With User Root and Run:
# screen -L -S <SESSIONNAME>
sudo screen -x <SESSIONNAME>
less /usr/local/apache/domlogs/DOMAIN | awk '{print $1}' | sort | uniq -c | sort -n
Option 2 :-
If you don’t know which domain is attacked. SSH to your server &
issue the following command. Option 1 if preferable especially if your
server is very busy has many domain. It will take quite sometimes to
process the log file. You can check by issuing “top -c” command to find
out which domain consume the most resources.
less /usr/local/apache/logs/access_log | awk '{print $1}' | sort | uniq -c | sort -n
Both of the option will give the ip and number of connections in the descending order. For example:
1
2
3
4
5
6
7
| ..... ..... ..... ..... 17843 56.51.155.156 19234 66.156.66.266 234578 156.56.16.76 |
# mysqldump -u<user> -p<pass> -B --all-databases > <filename> # mysqldump -uroot -pSuperPass -B --all-databases > all.sql
# mysqldump -u<user> -p<pass> <database> > <filename> # mysqldump -uWiki -pBlue wikidb > wikidb.sql
mysql -h hostname -u username -pthepassword databasename < dumpfile.sql
mysql -h localhost -u root -ptgX!2121 < thedumpfile.sql
cd /usr/local/src tar xf nginxadmin.tar cd publicnginx ./nginxinstaller install
|
./pythonfix ./nginxinstaller install |
cd /usr/local/src tar xf nginxadmin.tar cd publicnginx ./nginxinstaller uninstall
|
log-slow-queries=/var/lib/mysql/slow.log
touch /var/lib/mysql/slow.log chmod 660 /var/lib/mysql/slow.log chown mysql:mysql /var/lib/mysql/slow.log
/usr/local/apache/bin/httpd -D DUMP_MODULES | grep rewrite |
Syntax OK rewrite_module (static) |
LoadModule rewrite_module libexec/apache2/mod_rewrite.so |
[user@technoquick ~]$ sar -q -f /var/log/sa/sa23
'-q' to obtain the load average information, and '-f' to specify which sar file to obtain the information from.
Result: Linux 2.6.18-348.16.1.el5 (technoquickfix.com) 23/05/2015 12:00:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 12:10:01 AM 5 331 0.83 1.20 1.39 12:20:01 AM 7 316 1.20 0.78 1.01 12:30:01 AM 6 317 0.51 0.67 0.84 12:40:01 AM 5 312 0.75 0.62 0.73 Here’s an explanation of the above variables: “runq-sz” run queue length, which is the number of tasks waiting for run time. “plist-sz” is the number of tasks in the task list. “1davg-1″ refers to the system load average over the last minute. The load average is calculated as the average number of runnable or running tasks (R state), and the number of tasks in uninterrupted sleep (D state) over the specified interval. “ldavg-5″ is the system load average for the past 5 minutes. “ldavg-15″ the system load average for the past 15 minutes. Current CPU usage: Code: [user@technoquickfix ~]$ top c Tip: hit "P" to sort by processes that currently consuming the most CPU. Historical CPU usage: Check the "%idle" column: Code: [user@technoquickfix ~]$ sar -p Current memory usage: Code: [user@technoquickfix ~]$ free -m Historical memory usage: This depends on the version of sar, which used to use '-r' to show %memused and %swpused (swap memory used), but later changed to '-S' to show %swpused. Check "%memused" and "%swpused": Code: [user@technoquickfix ~]$ sar -r Current disk I/O usage: This will print the disk usage statistics 10 times, every 1 seconds. Check the %util column. Code: [user@technoquickfix ~]$ iostat -x 1 10 Historial disk I/O usage: Code: [user@technoquickfix ~]$ sar -d
#boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-194.el5PAE) root (hd0,0) kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/ initrd /boot/initrd-2.6.18-194.el5PAE.img
WHM has detected a manual hostname change.
To fix this problem, we recommend that you perform the following action:
Update your hostname in WHM’s
(http://new.hostname.com:2087/scripts2/changehostname) interface (Home
» Networking Setup » Change Hostname).
If you did, then that means that your hostname was updated outside of
WHM after cPanel was installed on that server. The fix is simple.