Monthly Archives: November 2008

Recalculate disk space for a single domain in Plesk

This is a pretty easy one, it’s useful if a client has gone over their allocated disk space. Occasionally even if they delete everything Plesk still thinks they are over until the nightly cron jobs are re-run.
This command just forces the job to re-run on  a single domain:
/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=Domain_name.com

Posted in Server Administration | Tagged , | Leave a comment

Whitelabel your Plesk web hosts nameservers

This post is all about how you can hide your hosting companies name servers. I run a web hosting company, and many of our clients are re-sellers, as you might expect, they don’t want people knowing who we are, so they want to hide our nameservers.
Incidentally, our nameservers are ns1.leadingedgehosting.co.uk & ns2.leadingedgehosting.co.uk
This post will show [...]

Posted in Server Administration, Web Development | Tagged , | Leave a comment

Preventing SQL Injection

For anyone who needs it, here is a script I wrote to prevent SQL injection. It uses references to the original global arrays to clean them up.

 

/**

 * added the following code to enabled readyness for magic_quotes() being removed

 * in PHP6

 *

 * added by C. Cook 15/8/2008

 */

//Turn off magic quotes the manual way, this also [...]

Posted in Computer Security, Databases, Web Development | Tagged , | Leave a comment

Simple Tip To Reduce Brute Force Hacks Via SSH

This is very simple, but I’ve seen a massive reduction in brute force attempts simply by changing the default port for SSH connections.
It’s pretty simple to change the default port:
Just edit the SSH configuration file, normally this will be found in /etc/ssh or /usr/local/etc/ssh.
To change it over, edit the line that reads “Port 22″ or [...]

Posted in Computer Security | Tagged , | Leave a comment

On The Hunt For a Hacker - Part One

One of my clients has recently been hacked, and not knowing who else to turn to asked me to look into the hack, try and sort out the mess and fix the broken websites.
So before I start this post I think I should make it clear that I am supporting my clients legacy code, which [...]

Posted in Computer Security | Tagged , | 2 Comments