Posts

Showing posts from July, 2013

view external: query (cache) denied

I have registered my nameserver  at registrar. I have properly updated the zone file in the server. But for some reason while checking the dig result the new name-server details were not showing correctly. I have checked the logs and got the following error. view external: query (cache) denied Reason : in the view external section in named.conf, the entry for my domain was commented. Once I un-comment, everything was correct. If you got similar type of error, check your named.conf and also check whether named.conf and the zone file is ok using the following commands named-checkconf named-checkzone domain.com /var/named/domain.com.db

MY SCRIPTS

Drop DDOS attack 20 04 2009 1. Find.. to which IP address in the server is targeted by the ddos attack netstat -plan  | grep  :80 | awk ‘{print $4}’ | cut -d: -f1 |sort |uniq -c 2. Find… from which IPs, the attack is coming netstat -plan  | grep  :80 | awk '{print $5}' | cut -d: -f1 |sort |uniq -c netstat -plan |grep :25 | awk '{print $5}' |cut -d: -f1 |sort |uniq -c |sort -n                   rsync give thie command in destination server. rsync --progress --stats -avzxl --rsh='ssh -p22' [source]52825@rsync1.cloudkeeper.net:/usr/home/52825/server.scalateam.inf/home/ekozasti/ [destination]/home/ekozasti/ rsync --progress --stats -avzxl --rsh='ssh -p22' 52825@rsync1.cloudkeeper.net:/usr/home/52825/server.scalateam.inf/home/ekozasti/ /home/ekozasti/ rsync -avz -e  /var/named/cpanelphp.txt root@ scp -P 2255 villaaqu_hotel.sql root@173.192.73.130:/root/                           rewrite rule  Options +FollowSymLinks RewriteEngine On RewriteRule ^.*$ index.ht

Script to optimize apache webserver

#!/bin/bash # Credits Gus Maskowitz, Rob Wilderspin, Dan Farmer, Mark Hyde # ===================================== DO SECTION ===================================== ME=`whoami` LAST_ECHO=0 TYPE_ECHO=0 if [ "$ME" != "root" ]; then echo “You’ll need to be root to run this”   exit 1 fi /sbin/service httpd status 2>&1 >/dev/null if [ $? -ne 0 ]; then exit 0 fi apachetuner_version=”Apachetuner v1.0″ if [ -f /etc/redhat-release ]; then system=$(cat /etc/redhat-release) else echo “This does not appear to be Red-Hat and is unfortunately not yet supported”   exit 0 fi # This was written specifically for a Rackspace environment if [ -f /root/.rackspace/server_number ]; then server_number=$(cat /root/.rackspace/server_number) fi server_name=$(uname -n) server_httpd_rpm=$(rpm -qf $(which httpd)) memtotal_mb=$(awk ‘/MemTotal/ {printf “%d”, $2/1024}’ /proc/meminfo) # mem_alert_level=$(echo $memtotal_mb | awk