Blocking advert sites using /etc/hosts

Using the hostsfile.mine.nu approach to blocking adverts is nothing new, but sometimes in the course of testing something, I do actually need to see if adverts and ad pop-ups are working correctly. So I do this… Download the hosts file …

Read more »

Persistent SSH connections with tmux

I administer a group of Amazon cloud instances and am constantly having to SSH in to update and monitor them. And for some reason (maybe because I live in the back of beyond) I often get really poor connections to …

Read more »

Size of MySQL fields – incorrect assumptions

I came to the world of MySQL with very little experience. I inherited a DB with a client I took on, and found myself learning what I needed as I went on. And I found something out today that surprised …

Read more »

Protecting WordPress from script fishing attacks with Fail2Ban (more…)

A better, but slightly more complex, solution has been posted here A previous post here suggested using a blanket ban on all 404s recorded in the access.log, but this isn’t working quite as well as expected. Mainly due to the …

Read more »

Protecting WordPress from script fishing attacks with Fail2Ban

A better, but slightly more complex, solution has been posted here Because WordPress redirects all incoming requests and serves dedicated 404 pages, nothing ends up in the Apache error.log. and so, The standard Fail2Ban filter apache-noscript.conf won’t work. So here’s …

Read more »

Fail2Ban with sendEmail Python MTA and SMTP

The servers I administer are on Amazon cloud, and there are often problems with outgoing emails and sendmail, so for a quick fix to add outgoing email support to scripts, I’m okay with using sendEmail, a small Python SMTP email …

Read more »

Fail2Ban Error – Iptables returned 200

This relates to seeing things like this in /var/log/fail2ban.log when restarting the fail2ban service: 2011-12-21 23:06:03,471 fail2ban.actions.action: ERROR iptables -D INPUT -p tcp -m multiport –dports http,https -j fail2ban-apache-wordpress-login iptables -F fail2ban-apache-wordpress-login iptables -X fail2ban-apache-wordpress-login returned 200 The very simple …

Read more »

Protecting Apache webservers from WordPress admin login dictionary attacks with fail2ban

A better solution has been posted here but I’ll leave this post up too. A very popular webserver I administer has been getting more attention from the script kiddies, and the Apache access log has been filling up with repeated …

Read more »

Screenshots with Awesome WM and xsnap

One thing I really, really liked about Compiz was the ability to hold down CTRL, drag the mouse over part of the screen, and take a screenshot. Sadly I discovered this about a week before it broke in 11.04 – …

Read more »

Awesome WM config tweaks

I use Awesome WM which has made a splendid alternative to Gnome/Unity since soon after this was unleashed in Ubuntu 11.04. Not only did I find Unity to be dog-slow, I was finding windows were getting in the way more …

Read more »