Posted on September 27th, 2006 by Admin.
Categories: Cpanel Hosting, EXIM.
Greetings guys ,
If you are getting this error in Exim logs : “503 valid RCPT command must precede DATA ”
Then you can try below solution …
The Error indicates that you must check your email before trying to send mail. The mail server requires authentication, which can be achieved using one of these methods:<
1. Pop before smtp — check your email for new mail before trying to send email. This adds your IP address to a relayhosts file and allows any email to be sent from that IP address for up to 30 minutes. After 30 minutes you have to authenticate again.
2. Configure your email client to authenticate automatically by checking the “my server requires authentication” box in your email configuration. You will be able to send mail without having to “pop” your mail box first.
Cheers ,
Kyle
Posted on September 26th, 2006 by Admin.
Categories: Perl, Cpanel Hosting.
Greetings Guys ,
If you are getting error as …
/usr/bin/perl: symbol lookup error: /usr/local/cpanel/3rdparty/lib/perl/auto/RRDs/RRDs.so:
undefined symbol: Perl_Gthr_key_ptr
then
delete /usr/local/cpanel/3rdparty/bin/rrdtool and then
run /usr/local/cpanel/bin/rrdtoolinstall to re-install to resolve it .
Cheers ,
Kyle
Posted on September 25th, 2006 by Jason.
Categories: Uncategorized, Hacking Truths, Black Holes.
Hello,
Hacking is the organised or unorganised access of another computer in a network. The network can be LAN/WAN/MAN.According to my knowledge I think that Russians are the first hackers.But now U.S.A and other countries stand best for it. Hackers are the people who hack a system in network.
There are three types of hackers.They are :-
1) White-Hat Hackers
~ ~ ~ ~ ~ ~ ~ ~
This are the hackers who hack a network to check the security holes. He use his knowledge to make better security for users.He share his knowledge with others.Ethical hackers or simply hackers are under this group.
2) Black-Hat Hackers
~ ~ ~ ~ ~ ~ ~ ~
This are the hackers who hack a network and distroy all he wants and he do harm to every one.He works for black undergrounds.He create viruses,worms and he bombs anonymous mails,and he uses D.O.S (Denial Of Service) attack to make a server hang and become offline.He is called Cracker.If you see some sites with skulls and some XXX pictures it can be crackers site.He don’t want to share his knowledge and he want to misguide newbies to nithing and fed-up with disappointment.
3) Brown-Hat Hackers
~ ~ ~ ~ ~ ~ ~ ~
This are the people who are in between Hackers and Crackers.They some times hack and else crack.They are cool people and share there knowledge to there friends or he people of his country. I think you got some ideas about hackers and crackers.So beware !!! There are more other peoples in this cyber world like Script Kiddies,Lamers etc..Script Kiddies are the people who uses others tools and others exploits to hack.They don’t want to know more about hacking and they don’t want to study hacking but want to hack.They are the people who don’t think and are the most fuckiest among proclaimed hackers.
Lamers are the real fools who say that they are hacker and they are going to hack you and kill your system.They fires that they can hack mail passwords and get inside your account.They simply ‘Blah…Blah…Blah’. But this idiots can’t do anything.They send viruses and worms they get and don’t know even the basics of hacking.They will never become a hacker or cracker.They will simply get caught by the police after some lamer attempts.
So this is the basic of hackers and hacking. The one important thing in hacking is that you should have patients.The studying of hacking takes years and you are always
studying and sharing.
Enjoy..
Posted on September 25th, 2006 by Jason.
Categories: Cpanel Hosting, Server Security, Linux, web Hosting.
Hello,
First we will download and unzip mod_security.
—–command—–
wget http://www.modsecurity.org/download/modsecurity-apache_1.9.4.tar.gz
tar -zxf modsecurity-apache_1.9.4.tar.gz
—–command—–
If you are using Apache 1.3.x you need to go into the apache1 directory as shown below. Cpanel and ensim both use apache 1.3.x
—–command—–
cd modsecurity-apache_1.9.4/apache1
—–command—–
If you are using Apache 2.x you need to go into the apache 2 directory as shown below. Plesk uses apache 2.x and may require the httpd-devel rpm to be installed to get mod_security working.
—–command—–
cd modsecurity_1.9.4/apache2
—–command—–
Next compile mod_security at a module. One of the lines below should work to compile it.
—–command—–
/etc/httpd/bin/apxs -cia mod_security.c
—–command—–
If you get a file not found install httpd-devel using up2date then try to compile it again. This will work fine on Plesk and the newer versions of Ensim that do not use “ensimized” httpd rpms. If you are running below Ensim 4.0 you should not continue unless you are certain of what you are doing.
—–command—–
up2date -i httpd-devel
/usr/sbin/apxs -cia mod_security.c
—–command—–
Make a backup of your httpd.conf before touching anything so you have something to go back to if it does not work.
—–command—–
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf-mod_sec
—–command—–
Now edit the httpd.conf , even though Ensim has multiple httpd.conf files you can put it in the primary config.
—–command—–
pico -w /etc/httpd/conf/httpd.conf
—–command—–
If you are running Apache 1.3.x - cPanel and Pre 4.0 Ensim
Scroll down below the following line:
AddModule mod_security.c
If you do not have the addmodule line find where the rest of them are located and put it right below the others.
If you are running Apache 2.x (Plesk and Ensim 4.0+)
Scroll down below the following line at which point you can continue on and paste the ruleset.
LoadModule security_module modules/mod_security.so
Now you are going to paste in this ruleset. Please feel free to modify it as you see fit. I think that it is a very non-agreesive ruleset that will work fine on just about any server. Please post any problems you have with it below!
—-Ruleset—-
# Turn the filtering engine On or Off
SecFilterEngine On
# Change Server: string
SecServerSignature “Apache”
# This setting should be set to On only if the Web site is
# using the Unicode encoding. Otherwise it may interfere with
# the normal Web site operation.
SecFilterCheckUnicodeEncoding Off
# The audit engine works independently and
# can be turned On of Off on the per-server or
# on the per-directory basis. “On” will log everything,
# “DynamicOrRelevant” will log dynamic requests or violations,
# and “RelevantOnly” will only log policy violations
SecAuditEngine RelevantOnly
# The name of the audit log file
SecAuditLog logs/audit_log
# Should mod_security inspect POST payloads
SecFilterScanPOST On
# Action to take by default
SecFilterDefaultAction “deny,log,status:403″
## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ##
# Require HTTP_USER_AGENT and HTTP_HOST in all requests
# SecFilterSelective “HTTP_USER_AGENT|HTTP_HOST” “^$”
# Require Content-Length to be provided with
# every POST request
SecFilterSelective REQUEST_METHOD “^POST$” chain
SecFilterSelective HTTP_Content-Length “^$”
# Don’t accept transfer encodings we know we don’t handle
# (and you don’t need it anyway)
SecFilterSelective HTTP_Transfer-Encoding “!^$”
# Protecting from XSS attacks through the PHP session cookie
SecFilterSelective ARG_PHPSESSID “!^[0-9a-z]*$”
SecFilterSelective COOKIE_PHPSESSID “!^[0-9a-z]*$”
SecFilter “viewtopic\.php\?” chain
SecFilter “chr\(([0-9]{1,3})\)” “deny,log”
# Block various methods of downloading files to a server
SecFilterSelective THE_REQUEST “wget ”
SecFilterSelective THE_REQUEST “lynx ”
SecFilterSelective THE_REQUEST “scp ”
SecFilterSelective THE_REQUEST “ftp ”
SecFilterSelective THE_REQUEST “cvs ”
SecFilterSelective THE_REQUEST “rcp ”
SecFilterSelective THE_REQUEST “curl ”
SecFilterSelective THE_REQUEST “telnet ”
SecFilterSelective THE_REQUEST “ssh ”
SecFilterSelective THE_REQUEST “echo ”
SecFilterSelective THE_REQUEST “links -dump ”
SecFilterSelective THE_REQUEST “links -dump-charset ”
SecFilterSelective THE_REQUEST “links -dump-width ”
SecFilterSelective THE_REQUEST “links http:// ”
SecFilterSelective THE_REQUEST “links ftp:// ”
SecFilterSelective THE_REQUEST “links -source ”
SecFilterSelective THE_REQUEST “mkdir ”
SecFilterSelective THE_REQUEST “cd /tmp ”
SecFilterSelective THE_REQUEST “cd /var/tmp ”
SecFilterSelective THE_REQUEST “cd /etc/httpd/proxy ”
SecFilterSelective THE_REQUEST “/config.php?v=1&DIR ”
SecFilterSelective THE_REQUEST “&highlight=%2527%252E ”
SecFilterSelective THE_REQUEST “changedir=%2Ftmp%2F.php ”
SecFilterSelective THE_REQUEST “arta\.zip ”
SecFilterSelective THE_REQUEST “cmd=cd\x20/var ”
SecFilterSelective THE_REQUEST “HCL_path=http ”
SecFilterSelective THE_REQUEST “clamav-partial ”
SecFilterSelective THE_REQUEST “vi\.recover ”
SecFilterSelective THE_REQUEST “netenberg ”
SecFilterSelective THE_REQUEST “psybnc ”
SecFilterSelective THE_REQUEST “fantastico_de_luxe ”
SecFilter “bcc:”
SecFilter “bcc\x3a”
SecFilter “cc:”
SecFilter “cc\x3a”
SecFilter “bcc:|Bcc:|BCC:” chain
SecFilter “[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\,\x20[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}”
SecFilterSelective POST_PAYLOAD “Bcc:”
SecFilterSelective POST_PAYLOAD “Bcc:\x20″
SecFilterSelective POST_PAYLOAD “cc:”
SecFilterSelective POST_PAYLOAD “cc:\x20″
SecFilterSelective POST_PAYLOAD “bcc:”
SecFilterSelective POST_PAYLOAD “bcc:\x20″
SecFilterSelective POST_PAYLOAD “bcc: ”
SecFilterSelective THE_REQUEST “Bcc:”
SecFilterSelective THE_REQUEST “Bcc:\x20″
SecFilterSelective THE_REQUEST “cc:”
SecFilterSelective THE_REQUEST “cc:\x20″
SecFilterSelective THE_REQUEST “bcc:”
SecFilterSelective THE_REQUEST “bcc:\x20″
SecFilterSelective THE_REQUEST “bcc: ”
# WEB-PHP phpbb quick-reply.php arbitrary command attempt
SecFilterSelective THE_REQUEST “/quick-reply\.php” chain
SecFilter “phpbb_root_path=”
—/Ruleset—
Now simply restart apache to enable mod_security.
—–command—–
service httpd restart
—–command—–
If sites start to have problems look at error log.
/etc/httpd/logs/audit_log
If you need or want to remove mod_security at any time simply comment out (put a # in front of) the AddModule mod_security.c line and restart apache. This will disable all of the rules and not allow it to load into apache.
Ok mod_security is all setup. I would tail the audit log occasionally to see if it is causing any trouble with legit traffic. The ruleset above should not cause many problems though. Thanks to all that have helped with the rules for this especially ryan at rfxnetworks and err0r. I have also adapted some rules from suggestions on the netberg forums by HostMerit.
Enjoy..
Posted on September 25th, 2006 by Jason.
Categories: Cpanel Hosting, Linux, web Hosting.
Hello,
The first thing you will have to do when you get internal server error is to check the server logs first.
If you are getting something like “Premature end of script headers: /home/kaizen/public_html/cgi-bin/mt/mt-config.cgi”
make sure that all the files in /usr/local/cpanel/cgi-sys/*.cgi should be 755
also the files /usr/local/cpanel/base/*.cgi should under group wheel
In /etc/httpd/conf/httpd.conf file check following correctly.
—————————————————————————————————
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /cpanel /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAlias /whm /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAlias /securewhm /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAlias /webmail /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/webmail/(.*) /usr/local/cpanel/cgi-sys/wredirect.cgi
—————————————————————————————————
/scripts/updatenow
/scripts/fixeverything
/scripts/upcp –force
If that doesn’t even work for you then in httpd.conf change this line
RLimitMEM 23178922 (~22 MB)
and replaced it with
RLimitMEM 157286400 (~150 MB)
Also some time it may happen because of phpsuexec. So you can try turning it off by going to “Enable/Disable SuExec” under “Server Setup” in WHM.
Also try chmod /usr/bin/* then to 755
Enjoy..
Posted on September 25th, 2006 by Jason.
Categories: Linux, web Hosting, MySQL.
Hello,
Use this guide at your own risk! Fdisk is a very powerful tool and can easily screw up a server if you are not careful. This guide was designed around a server that has SCSI disks and it is mounted in the secondary positions, sdb. If you have a ide drive it would be hdb.
This guide is pretty vague, that was done on purpose. It is very hard to do something like this if you are not familiar with linux and fdisk. I do not want people screwing around with this if they are not confident in what they are doing. I am just trying to stop people from getting mad at me. Anyways below is the guide it is to be used totaly at your own risk but I can say that if done correctly it will work just fine.
That all say here is the actual guide.
fdisk /dev/sdb
The first step is to delete all of the old partitions. If you have a lot of partitions you are going to have to keep trying to go to higher numbers. Once you have deleted all partitions it will say there are no paritions.
d –delete
1 — partition 1
d
2
d
3
d
4
Create a new partition as /dev/sdb1
n — new
p — primary
1 — first partition
– use default cylinder value, which is the first available
+5000M — make ~ a 5Gb partition which I think is a good size for a mysql database directory
Create a /tmp partition as /dev/sdb2 that will be ~1Gb
n
p
2
+1000M
Create a backup partition as /dev/sdb3 which will take up whatever extra space the disk has.
n
p
3
- uses the rest of the disk
w — writes out and saves
Now we are going to format the filesystem as ext3 which is what most servers run with and is in my opinion the best choice.
mkfs -t ext3 /dev/sdb1
mkfs -t ext3 /dev/sdb2
mkfs -t ext3 /dev/sdb3
Now add the following in /etc/fstab so that they are mounted automatically on boot.
/dev/sdb1 /var/lib/mysql ext3 defaults,usrquota 1 1
/dev/sdb2 /tmp ex3 noexec,nosuid,rw 0 0
/dev/sdb3 /backup ext3 defaults 0 0
service mysql stop; killall -9 mysqld
Now copy the old dir so we can copy
mv /tmp /tmp_old; mkdir /tmp
mv /var/lib/mysql /var/lib/mysql_old; mkdir /var/lib/mysql
mount /var/lib/mysql
mount /tmp
cp -R /var/lib/mysql_old/* /var/lib/mysql/
chmod 755 /var/lib/mysql
chown mysql:mysql -R /var/lib/mysql
cp -R /tmp_old/* /tmp/
chmod 0777 /tmp
service mysql start
Hopefully it should all be working fine.
Posted on September 24th, 2006 by Admin.
Categories: Fun, Googlism.
Greetings guys ,
You might be aware of some of below mentioned FUN / Stuff can be done with Google ….
=====================================
=====================================
Cheers ,
Posted on September 22nd, 2006 by Admin.
Categories: Cpanel Hosting, Server Security, DNS.
Greetings Guys ,
To add SPF record to the domain’s Zone file ..do following..
1. Edit Zone file of that Domain
2. add this line
domainname.com 14400 IN TXT “v=spf1 a mx ptr ~all”
That’s all ..
Cheers
Kyle
Posted on September 22nd, 2006 by Admin.
Categories: Cpanel Hosting, Server Security, Linux.
Greetings ,
Just type ….
HISTTIMEFORMAT=”%D %T ”
To set Date and Time format for History command and figure out who and when fired what command
Cheers ,
Kyle
Posted on September 22nd, 2006 by Admin.
Categories: Cpanel Hosting, MySQL.
Greetings Guys ,
To set the mysql database backup through cronjob …
* * * * * /usr/bin/mysqldump -u dbusername dbname -p password > /home/uesrname/dbname.sql
Where you can setup the time / interval when you need backup
Cheers
Kyle