To rebuild cPanel’s php so cPanel use difference PHP, you can use this syntax
/scripts/makecpphp
To rebuild cPanel’s php so cPanel use difference PHP, you can use this syntax
/scripts/makecpphp
This is a simply command in Linux to check the no. of connection opened per IP.
/bin/netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -nr |more
Detect size of transfer
iftop -i interface
Auto block DDOS IP ((D)DoS-Deflate)
http://deflate.medialayer.com/
mod_evasive
http://www.eth0.us/mod_evasive
Q. How do I upgrade Linux kernel? I would like to upgrade kernel w/o compiling from source code i.e. binary upgrade. How do I perform the actual upgrade of the kernel in Linux?
A. You need to compile kernel only if
=> You need custom made kernel for specific task such as embedded kernel
=> You need to apply specific patch to Linux
If your system is registered with Red Hat Network (RHN), then you can use the up2date command as follows:
# up2date -f kernel
For SMP kernel (multi core or multiple CPU) use command:
# up2date -f kernel-smp
Use yum command to upgrade kernel:
# yum update kernel
If you have downloaded RPM file use rpm command:
# rpm -ivh kernel*
Use apt-get command. First find your kernel version:
$ uname -r
Next find available kernel images:
$ apt-cache search kernel-image
Now install kernel by explicitly specifying version number:
# apt-get install kernel-image-x.x.x-xx
OR
$ sudo apt-get install kernel-image-x.x.x-xx
http://www.cyberciti.biz/faq/linux-kernel-upgrade-howto/
If you are testing an email problem and see this error:
R=lookuphost defer (-1): lowest numbered MX record points to local host
This means the domain name is not listed in /etc/localdomains
You generally can fix this by running /scripts/mailperm
If not, you should check /var/cpanel/users/USERNAME and make sure there is a DNS line in for this domain name and it is not along the lines of XDNS
root@server8 [~]# mail -v test@server.com Subject: test test . Cc: LOG: MAIN <= root@server.server8.com U=root P=local S=391 root@server8 [~]# delivering 1K2CMu-0004PY-F4 LOG: MAIN lowest numbered MX record points to local host: server.com LOG: MAIN == test@server.com R=lookuphost defer (-1): lowest numbered MX record points to local host LOG: MAIN Frozen
source: http://wiki.cpaneldirect.net/wiki/index.php/R%3Dlookuphost_defer_%28-1%29:_lowest_numbered_MX_record_points_to_local_host
A Backup MX Server is a mail server that will store (spool) your incoming email if your primary mail server becomes unavailable. A mail server can become unavailable to receive incoming mail for a number of reasons. A few examples are:
If you do not have a Backup MX Server, the following conditions may occur:
How Email works when a Backup MX Server is involved:
Go to your directory
to change permission from one to other
find -perm 777 -exec chmod 755 {} \; -print
To change all directory permission
find -type d -perm 777 -exec chmod 755 {} \; -print
To change all public_html permission
cd /home; find -name "public_html" -exec chmod 711 {} \;
cd /var/named
replace 'ns1.olddomain.com' 'ns1.newdomain.com' -- *.db
replace 'ns2.olddomain.com' 'ns2.newdomain.com' -- *.db
You have to replace ns1/ns2.olddomain.com and ns1/ns2.newdomain.com with the correct nameservers.
Restart named using the command
service named restart
named -u named
ls /scripts/ | grep named
/scripts/rebuilddnsconfig
Also remember to change your nameserver too
vi /etc/nameserverips
ps -aux | grep user| cut -c 9-14
eval ps ax|grep "user"|grep -iv "grep"| awk '{print $1}'
find / -user username | more
find /home/david -name ‘index*’
find /home/david -iname ‘index*’
http://www.codecoffee.com/tipsforlinux/articles/21.html
Find String On File
grep -H -r “text-to-find” /directory
cari file hari ini
find . -mtime -1 \! -type d -exec ls -l {} \;
Allowing DNS Recursion is like running an Open SMTP Relay. You allow anyone to query your DNS server and this can easily lead to abuse.
You can fix this by disabling recursive lookups for not authorized IP’s.
This article will teach you step by step how to do this.
pico /etc/named.conf
Add before options {} the fallowing:
acl “trusted” {
MAIN_IP;
SECONDARY_IP;
127.0.0.1;
};
Where MAIN_IP and SECONDARY_IP are the IP’s of your nameservers on that server.
Now you have to add in the same file /etc/named.conf in the options {} part of the file the fallowing:
allow-recursion { trusted; };
allow-notify { trusted; };
allow-transfer { trusted; };
service named restart
Source:
http://www.cpanelconfig.com/cpanel-security-related-articles/closing-open-dns-servers/
Powered by WordPress