cPanel Podcasts

cPanel officially launched its podcast series Sunday, August 1, 2010, www.cpanel.net/podcast. The cPanel team added this new multimedia addition to provide listeners with practical instruction for improving their websites.

Every two weeks, Technical Writer Lindsey White will interview cPanel experts and investigate a variety of subjects to help listeners learn more about cPanel products.

The cPanel podcast team will release a new episode on a bi-weekly basis as well as offer information about the next episode via the podcast site. There is a pre-released schedule for the first three podcasts in the series, which includes:

Podcast Overview

  • Episode 1- “How to Install WordPress in cPanel”
    • Will go through the basic steps to help answer this commonly asked question
    • This podcast became available August 1, 2010.
  • Episode 2- “Secure Sockets Layer (SSL) Certificates Demystified”
    • Will explain how SSL certificates can be used to make a website more secure
    • This podcast will be available August 15, 2010
  • Episode 3- “Installing Custom Web Applications
    • Will provide listeners with insight into the process of installing web applications in cPanel
    • This podcast will be available September 1, 2010

Podcast episodes will be available via direct download from the cPanel Podcast site. Listeners will also have the option to subscribe via RSS feed or through iTunes.

Listeners may visit http://www.cpanel.net/podcast for more information about the cPanel podcast series.

  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Slashdot
  • Twitter

How to add a FTP Account

Adding an FTP account will allow users to access the domain’s folder on the server’s hard disk.

To create an FTP account:

  1. Enter a username.
  2. In the Password box, type the account’s password.
    • Remember to use a secure password. A secure password does not contain dictionary words, and includes letters, numbers, and symbols.
    • For help generating a strong password, click the Password Generator button.
  3. Retype the password in the Password (Again) box.
  4. Specify the FTP account’s home directory.
    • The Directory field defines the top level of directory access that will be granted to the new account. For example, an account with a Directory assignment of /$dir will not be allowed to access the / (root) directory; however, it will be able to access /$dir and all of its subfolders.
  5. Set the disk space quota. The Quota field determines how much disk space will be allocated to the FTP account.
  6. Click Create FTP Account.

If you have trouble uploading files via FTP, you may need to adjust the quota to allow more disk space for your account.

note Note: You will not be able to exceed the disk space quota allocated by your hosting plan. If you are currently using the maximum disk space allowed by your plan, you may need to upgrade your hosting account or delete old or unused files.

Upon creation, the new account should be displayed in the list below. This list contains 4 functions for existing accounts. You can:

  • Change a password.
  • Adjust a quota.
  • Delete an account.
  • Configure an FTP client.

Tutorial

  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Slashdot
  • Twitter

How to add an email account

To add a new email address:

1. Type the email address to be created in the Email field.

  • If you manage more than one domain, make sure to select the appropriate domain from the pull-down menu.

2. Type the password in the Password field.
3. Retype the password in the Password (again) field.
* You can click the Password Generator link to have a strong password generated for you.
4. Type the quota in the Mailbox Quota field.

  • The quota defines how much hard drive space the account will be allowed to use.
  • PICK Important: Due to mail server constraints, quotas cannot be greater than 2048 MB. Quotas exceeding this amount must be unlimited.

5. Click Create Account.

Tutorial

  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Slashdot
  • Twitter

Setup load Alerts on your dedicated server or VPS

A customer of ours wanted to get emails from his server, if the load ever rose above a certain number.

Here’s a script I wrote up to accomplish this:

EMAIL="your email 1"
SUBJECT="Alert $(hostname) load average is $L05"
TEMPFILE="/tmp/$(hostname)"
TOPLOAD="10"
echo "Load average Crossed allowed limit." >> $TEMPFILE
echo "Hostname: $(hostname)" >> $TEMPFILE
echo "Local Date & Time : $(date)" >> $TEMPFILE
echo "| Uptime status: |" >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
/usr/bin/uptime >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
echo "| Top 20 CPU consuming processes: |" >> $TEMPFILE
ps aux | head -1 >> $TEMPFILE
ps aux --no-headers | sort -rn +2 | head -20 >> $TEMPFILE
echo "| Top 10 memory-consuming processes: |" >> $TEMPFILE
ps aux --no-headers| sort -rn +3 | head >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
echo "| Memory and Swap status: |" >> $TEMPFILE
/usr/bin/free -m >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
echo "| Active network connection: |" >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
/bin/netstat -tnup | grep ESTA >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
echo "| Disk Space information: |" >> $TEMPFILE
echo "-------------------------------------------" >> $TEMPFILE
/bin/df -h >> $TEMPFILE
echo "-----------------THE END-------------------" >> $TEMPFILE
L05="$(uptime|awk '{print $(NF-2)}'|cut -d. -f1)"
if test $L05 -gt $TOPLOAD
then
mail -s "$SUBJECT  $L05" "$EMAIL" < $TEMPFILE
fi
rm -f $TEMPFILE

Add this to the root crontab on the server by running:

echo "* * * * * /root/loadalert >/dev/null 2>&1" >> /var/spool/cron/root

Now we need to restart crond to pick up the change:

/etc/init.d/crond restart

I hope this helps someone out there!

  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Slashdot
  • Twitter

How to remove an IP from cPHulkD

We had a customer who forgot their root password, and within a few tries at different variations, WHM had locked them out. Here’s what we had to do to clear out the IP’s:

Lets “use” the cphulkd database, and see what tables we have

root@w4 [~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2279778
Server version: 5.0.90-community MySQL Community Edition (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use cphulkd;

Database changed
mysql> show tables;
+-------------------+
| Tables_in_cphulkd |
+-------------------+
| auths             |
| brutes            |
| good_logins       |
| logins            |
| whitelist         |
+-------------------+
5 rows in set (0.00 sec)

So we have auths, brutes, and logins.
The table we are looking for is brutes. This is the table where the blacklisted IPs reside.

mysql> select * from brutes;
+--------------+-------------------------------------------------------------------------+---------------------+---------------------+
| IP | NOTES | BRUTETIME | EXPTIME |
+--------------+-------------------------------------------------------------------------+---------------------+---------------------+
| 24.90.253.66 | 5 login failures attempts to account moo@omg.com (ftp) | 2008-01-07 14:54:02 | 2008-01-07 14:59:02 |
+--------------+-------------------------------------------------------------------------+---------------------+---------------------+
1 row in set (0.00 sec)

mysql>

So we simply remove the entry.

mysql> delete from brutes where IP='24.90.253.66';
Query OK, 1 row affected (0.00 sec)

mysql> 

There you have it! This is most likely the quickest way to remove IP’s that have been locked out.

  • Digg
  • del.icio.us
  • Facebook
  • Reddit
  • Slashdot
  • Twitter