Category: linux

  • ipmi / linux / dell poweredge SC1435

    We recently bought two Dell SC1435 servers off eBay. They seemed cheap and quite well specced (dual 4 core CPUs, plenty of RAM for us) – perhaps ideal for redundant mail servers. Anyway, they’re IPMI 2.0 compliant – meaning they should be controllable remotely (e.g serial console, forceful power cycling etc without the need for…

  • Moving towards ‘inbox zero’

    Over time my inbox grows larger and larger…. and eventually it starts to take ages to sync/navigate around – 15,000+ messages in an inbox can’t help.

  • iptables – rule deletion by number

    Deletion is easiest if you know the rule number. Rather than counting down, it’s easiest to use – iptables -nL –line-numbers Which may show something like :

  • Fail2ban filter for WordPress

    With the annoying brute force wordpress hack going round, one way to protect your site(s) would be to use fail2ban, with a configuration something like (which I’ve shamelessly lifted from http://blog.somsip.com/2011/12/protecting-apache-webservers-from-wordpress-admin-login-dictionary-attacks/ ). The below seems to be working, and given it’s relative simplicity it’s obvious how you’d go about changing to protect other POST based scripts…

  • Script to fix NFS (Debian Squeeze + Backports bits)

    I have a NFS server running Debian Squeeze. Additionally it’s using the 3.2.x kernel from backports, and the nfs-kernel-server from backports too. Sometimes NFS breaks, and gives helpful messages like : mount.nfs: connection timed out or just: Stale NFS handle on clients.   While I’m confident that my /etc/exports and other configuration files are correct,…

  • Virtualbox 4.2 VM autostart on Debian Squeeze & Wheezy

    One new feature of VirtualBox 4.2 is that it has support for auto-starting vm’s on bootup of the host server (via init etc). This means I can remove my hackish ‘su – vbox -c “VBoxHeadless –startvm VMName &”‘ additions in /etc/rc.local, and the VM’s will also hopefully be terminated gracefully on shutdown. The docs/guides online…

  • Migrating an ext3 filesystem to ext4 (Debian Squeeze)

    Interestingly (well, perhaps not really) this is very easy. In my case, I’m hoping that the migration will lead to faster fsck times (currently it’s taking about an hour, which is somewhat excessive, each time the server crashes for whatever reason). In my case, the filesystem is /dev/md0 and mounted at /home – change the…

  • Debian Squeeze (NFS broken with backports kernel)

    Our office server has been running the Squeeze-Backports kernel for some time – without issue – until today. Amongst the things it ‘should’ do, is act as an NFS server for the office computers (giving us a common /home directory). Every so often, NFS breaks for some reason. Perhaps in some way, the NFS server…

  • Fixing REMOTE_ADDR when behind a proxy/varnish server

    I had an annoyance where varnish proxy infront of a LAMP server and the LAMP server therefore thought all clients were from the varnish proxy – rather than the client’s real IP address – i.e. $_SERVER[‘REMOTE_ADDR’] was set to the IP address of the Varnish proxy and not that of the client’s actual IP address.…

  • fsck paranoid?

    Some random hints : Ensure the final field / column in /etc/fstab is non-zero for other filesystems you have mounted; if it’s 0 then fsck will never run on them. fsck -Cccy /dev/blah1 does a read-write (non-destructive test). Works well on SSDs 🙂 Example from /etc/fstab: /dev/md0  /mount/point ext3 defaults 0 2 When looking at…