Category Archives: Technical

Demoing Drupal

I’ve noticed a posting on a job site recently advertising for Drupal experience. This motivated me to setup a Drupal install on the server to play around with it for a bit. Something that caught my eye in the documentation on Drupal was the intention to make Drupal server-independent. So I am looking forward to testing Drupal in an IIS setting, something that WordPress isn’t fully integrated with yet.

Of course, this argument is nullified by IIS7’s use of Web App Gallery, which I had managed to test on Server 2008. My understanding is that WPI easily installs most of the common web application packages available today, including WordPress, Drupal and Joomla.

I am curious to learn which setup will ultimately lead to the best CMS. There are many arguments currently out on the web extolling the virtues of Drupal, WordPress and Joomla; but it takes time to experience each of them.

Unban me!

If you’ve found yourself unfortunate to lock yourself out of SSH and banning yourself from your own server via Fail2Ban, then here’s how to unban yourself:


iptables -L
look at the Chain fail2ban-ssh
notice the ip address to unban and count at which line number this is.
e.g.:
Chain fail2ban-ssh (1 references)
target prot opt source destination
DROP 0 -- 61.236.117.xxx anywhere
DROP 0 -- 61.236.117.yyy anywhere
RETURN 0 -- anywhere anywhere
execute the following command:
iptables -D fail2ban-ssh if you want to unban user 61.236.117.yyy use:
iptables -D fail2ban-ssh 2

Disabling revision history and other wp-config.php edits

Still trying to nail down the WordPress load hangs in Firefox…can’t seem to pin it down.

However I decided to clean up the back end database by deleting old post revisions and optimizing the table.

Using phpMyAdmin, I performed the following query:
delete from wp_posts where post_type=’revision’;

Then I disabled the option in wp-config.php by adding the following line:
define(‘WP_POST_REVISIONS’, false);

Lots of other nifty options to do with tweaking WordPress via wp-config.php can be found on the codex.

SSH2 for WordPress

Ever since I secured file transfers to/from the server with SFTP, the built-in WordPress upgrade function stopped working. In order to get the upgrader working a secure manner (as well as add another level of security to the server) I requested SSH2 installed on our server. I would have installed it myself except that our hosting provider refused to correct some initial problems related to the dedicated box, which made the SSH2 install a pain.

I did find some reference material on the subject at the following: Using SSH to Install/Upgrade and Does your WordPress server support SSH2?

The Ban-mobile

I’ve been using a lot of this lately:

iptables -A INPUT -s IP-ADDRESS -j DROP
service iptables save

I’ve noticed that pop3 attempts aren’t being filtered by Fail2Ban; I’ve seen an increase in dictionary attacks on this port and have had to resort to manually banning the offenders. I’ve also installed a LogViewer in WHM to assist in the fight.