Places to increase Ubuntu Volume


December 30th, 2008

Because every install seems annoyingly limited in max volume:

  • Application volume sliders
  • Volume slider in top menu (double click it)
  • alsamixer

Prince of Persia


December 27th, 2008

Somewhere between Assassin's Creed, Shadow of the Colossus and Mirror's Edge. I got through it in around 15 hours, which I'll guess is a reasonably average time.

While I was running up a collapsing tower my brother walked past and asked me "what movie is that?".

The graphics are nice, the game flows well, and the quicktime events are happily unimportant. It feels very much like a game that ticks all the boxes of what a modern game should have -- and I don't mean that in a bad way. It's genuinely fun to play, and I actually found myself caring about the main characters by the end of the game.

The ending is inspired.

Using Konsole / Gnome Terminal on Windows


December 17th, 2008

I've always wanted to use Konsole on Windows. It's mostly because I'm sick of using PuTTY as an SSH terminal. it's fine for what it does, but the fact it doesn't run from a shell that has a full set of Linux userspace tools has always been an irritant. A few months ago I decided to start looking for a better solution -- running Konsole on my Windows box.

A few years ago this would have been mostly impossible but I now use Konsole on all my machines! There are a few solutions for using a better terminal emulator on Windows. In order of usability:

  • Use Konsole in a VMWare Workstation VM and enable Unity - Unity is like Parallels for Mac, except it's on Windows. You boot up your Windows / Linux VM and enable it, and the windows in the VM become native windows on the host. The emulation isn't perfect, but alt-tab and copy/paste work which are the important two. Drag & Drop between the two OSes works well in VMware too. The biggest problem is that it's relatively slow compared to other solutions and dragging windows around makes it obvious there is trickery going on.
  • Use Konsole in VirtualBox and enable Seamless Mode - Like VMWare Workstation, but it doesn't work as well and costs less (ie, free). Copy/paste is a little flaky (don't try to do anything but plain text), alt-tab isn't unified. On the plus side, the emulation feels a lot snappier than VMWare.
  • Use Konsole in andLinux - Definitely the fastest solution, alt-tab works properly and copy/paste is pretty good too. The only issue is that andLinux communicates between the host & client OS via a special loopback NIC it installs, and this played havoc with my Windows Vista laptop. With the device enabled Windows would ignore other NICs installed (like a ethernet or wifi connection) and refuse to talk to the internet. Dis/Enabling the andLinux NIC and rebooting the guest would get it working eventually, but it was a lot of work. I suspect with more work a simple solution could be found, but I gave up.
  • Use Konsole in KDE for Windows - fgsfds, try this only if you have a lot of patience and willingness to hack stuff. I couldn't get everything installed sucessfully, much less working. Once it's setup properly I'm sure it will win, though.

Installing pam_abl to block brute force SSH attempts on Linux


December 16th, 2008

pam_abl is a great tool to mitigate SSH bruteforce attacks on a server. It works by monitoring remote hosts trying to authenticate via PAM, and silently failing attempts from a given host (or for a certain user) if the number of failed attempts has exceeded a given threshold. Unlike other techniques like fail2ban, the brute forcer (if they are even human) will not realise you're blocking them. It also works in realtime.

Unfortunately, it's not in the repository of many distros anymore (at least not Debian and Ubuntu). You can still install it by hand reasonably easily. These instructions apply to Debian, but are pretty generic and should work with a little tweaking on any distro.

  1. Install the required tools: gcc, libpam0g-dev, libdb-dev (likely any 4.x version would work)
  2. Download the .tar.gz from the official project.
  3. Extract: tar xzf pam_abl-0.2.3.tar.gz
  4. Compile: cd pam_abl; make
  5. Install: sudo make install
  6. Create the configuration file in /etc/security/pam_abl.conf. I use something like the below. You can read more about the available options in the doc/ folder of the .tar.gz:
  7. host_db=/var/lib/abl/hosts.db
    host_purge=1d
    host_rule=*:10/1h,30/1d
  8. Add pam_abl to SSH'd PAM stack. Edit /etc/pam.d/sshd and add this line right before real authentication begins (usually the reference to pam_unix). See the documentation for more info again:
  9. auth	required	pam_abl.so config=/etc/security/pam_abl.conf
  10. Enjoy your SSH bruteforce protected server!

A few other tips:

  • You should manually run pam_abl --purge every day or so, it doesn't seem to purge automatically all the time.
  • You can add pam_abl to the PAM stack of other applications if you want, it works the same way.
  • You can see the contents of the pam_abl database with the program pam_abl. A useful trick to see all currently blocked hosts: pam_abl | grep --before-context=1 "*"
  • If the database gets too large pam_abl will stop working properly. Make sure you set a sane purge rule.
  • Remember you don't need to be very aggressive to catch 99.9% of bruteforce attempts.

Misc