buy tb-500

redirect SMTP port (linux) Postfix mail

March 14th, 2011 by ayad
iptables -t nat -A PREROUTING -d 10.1.1.1 -p tcp --dport 26 -j REDIRECT --to-ports 25

just you need to change the ip to the server ip, i have tried it my self and working fine,

References

http://www.5dollarwhitebox.org/wiki/index.php/Howtos_Basic_IPTables#Port_Redirects

plesk “Unable to connect to database: saved admin password is incorrect”

March 4th, 2011 by ayad

if you got the above error, then you need to follow the below steps

1. Start by logging in to your server via ssh as root user.

2. Stop MySQL server. In RedHat systems this is done usually like this

/etc/init.d/mysqld stop

3. Open up your MySQL configuration file. Usually this file is called my.cnf and is in /etc directory.

4. Add this line into the [mysqld] section:

skip_grant_tables=1

5. Start MySQL server.

/etc/init.d/mysqld start

6. Login to MySQL as admin user

mysql -u admin

7. Run this query :

update mysql.user set password=password(‘current_password’) where user=’admin’

Where current_password is the string from this file /etc/psa/.psa.shadow

8. Exit the MySQL console.
9. Stop MySQL sever.
10. Remove the line from /etc/my.cnf
11. Start MySQL.

Now the problem should be solved.

Reference

http://www.onlinehowto.net/Tutorials/Plesk-Control-Panel/Saved-admin-password-is-incorrect/593

User ‘xxxxxx’ is over quota. cpanel

February 17th, 2011 by ayad

solution is below

remove all the users from inside this /var/cpanel/overquota

Reference

http://forums.cpanel.net/f5/login-webmail-internal-server-error-user-over-quota-141325-p2.html

Disk space full

February 17th, 2011 by ayad

du -sh *

to show the folders that is full

Error: Connection to the database server has failed: Table ‘mysql.servers’ doesn’t exist

February 15th, 2011 by ayad

The solution is below

linux/plesk

# mysql_fix_privilege_tables --user=admin --password=`cat /etc/psa/.psa.shadow` --verbose

This should definitely fix the problem.

linux/cpanel

# mysql_fix_privilege_tables --user=root --password=<mysql password here> --verbose

References
http://linuxhostingsupport.net/blog/problem-adding-a-database-user-in-plesk-or-restarting-mysql-table-mysql-servers-doesnt-exist


ftp plesk

February 4th, 2011 by ayad

How to enable FTP on Plesk
To enable FTP on plesk you will have to shell into the server. Once in your server you will have to run these commands.

To turn on FTP run:
chkconfig ftp_psa on

Turnning off the ftp service would be the first trouble shooting setup if the ftp service was running but not working.

To turn off FTP run:
chkconfig ftp_psa off

The FTP files for Plesk is located on the xinetd service. So make sure you have the xinetd is also turned on.

To check the status of xinetd run:
service xinetd status

To start if stop run:
service xinted start

And if you need to stop run:
service xinted stop

References

http://www.openkb.org/plesk-disable-ftp/

Thank you.

redirection usig index.html

January 17th, 2011 by ayad

http://www.web-source.net/html_redirect.htm

How To Enable Security Auditing in Windows XP Pro

January 15th, 2011 by ayad

Logging events can help you monitor your computer or network and prevent a successful attack and can also prove very useful in determining how and when an attack occurred if you use the logs as forensic evidence.

  1. Click on Start
  2. Click on All Programs
  3. Click on Administrative Tools (if its there skip to Step 7. To turn it on continue with Step 4)
  4. Right-click on the Start bar and select Properties.
  5. Select the Start Menu tab and click on the Customize button
  6. Select the Advanced tab and scroll to the bottom of the options for System Administrative Tools and select the option you want
  7. Select Local Security Policy
  8. Click on the + next to Local Policies to expand the tree
  9. Select Audit Policy
  10. For each option in the right panel you can double-click on it to select Success or Failure logging
Tips:
  1. To disable logging for an option just uncheck both the Success and Failure boxes
  2. Remember that logging can affect performance. Do some research to determine the right balance between logging and performance for your system

Thank you

Mysql load

January 12th, 2011 by ayad

to detect the user that caused mysql to be high load

mysqladmin processlist

Thank you.

mysql slow queries

January 12th, 2011 by ayad
wget http://hackmysql.com/scripts/mysqlsla
chmod 755 mysqlsla*
mv mysqlsla* mysqlsla
./mysqlsla -lt slow /var/log/mysql-slow.log

reference 

http://forums.cpanel.net/f189/high-load-mysql-160213.html