Modifying the SSH ban list.

6 04 2009

Hi everybody!

How many times have you locked yourself out of your remote server by being too quick for your own good? My servers are all set to ban an IP after 3 connection attempts within a minute, so it happens quite regularly that I lock myself out.

The list of banned IPs is stored in /proc/net/ipt_recent. There are a couple of commands this ‘file’ understands…

To see what IPs are currently banned, use:

cat /proc/net/ipt_recent/BAN_LIST_NAME).

To remove an IP from the list use:

echo "" > /proc/net/ipt_recent/BAN_LIST_NAME

To add a suspicious or known bad IP:

echo "" > /proc/net/ipt_recent/BAN_LIST_NAME

To remove all entries (not really a very good idea):

echo "clear" > /proc/net/ipt_recent/BAN_LIST_NAME

That’s all for now.


Firefox over SSH

27 03 2009

Hi, just a little snippet of knowledge I’ve picked up. I was having all sorts of problems getting Firefox to run stably over an SSH connection to a remote machine I was helping someone out with. It just kept hanging after the initial screen was shown. The answer, as tends to be the case, was horrifically mundane… Wait for it…

I had a copy of Firefox open on another desktop. Moral of the story… If you’re planning on running Firefox from a remote location, make sure you haven’t got a copy open on the local machine.

Anyway, that’s all for now. Hope this is of use to someone!