iptables on a ChicagoVPS (OpenVZ) VPS

iptables is not always easy to deal with so I prefer to use Uncomplicated firewall (ufw) in Ubuntu, because it simplifies configuring and maintaining my firewall rules. Unfortunately, ufw does not play nice with OpenVZ containers so I decided to find something else. In the end (after testing various things) I decided to install the package iptables-persistent which is not as sexy as ufw but gets the job done. iptables-persistent uses two configuration files /etc/iptables-persistent/rules....

January 6, 2013 · 2 min · alj

Wake on LAN from WAN with a TP-Link router

If you have a computer on your local network you want to wake from the Internet and you have a TP-Link router (in this case a TL-WDR4300) you are in luck. First, create a virtual server (or port forwarding) in which we forward an arbitrary port to port 9 at the IP address of the machine you wish to turn on (Go to Forwarding → Add New): If you test as this point, it will work....

December 27, 2012 · 2 min · alj

Ubuntu Natty: Fixing "unknown locale" in Python

The fix itself is the same as for Python 2.5 – only the line numbers have changed. Open the file /usr/lib/python2.7/locale.py and find the line containing en_gb (line 921) and add these lines (this works for Danish locales): 'en_dk': 'en_DK.ISO8859-1', 'en_dk.iso88591': 'en_DK.ISO8859-1', '[email protected]': 'en_DK.ISO8859-15', In order to avoid this change getting overwritten by packages updates, I use dpkg-divert: $ sudo dpkg-divert --add --rename --divert /usr/lib/python2.7/locale.py.real /usr/lib/python2.7/locale.py $ sudo cp /usr/lib/python2....

June 27, 2011 · 1 min · alj

Tip: Change the Chrome proxy settings when running Xubuntu (Xfce)

For a long time, in the olden days, I ran Xubuntu – mainly because I loved the simplicity of the desktop (and also because it was a lot lighter on my machine, a Thinkpad T40, than GNOME. And I just have no love for KDE). Then some changes were made to the menu system (or the way to edit it) which annoyed the hell out of me – that combined with a new, more powerful machine, I decided to switch to GNOME, which I’ve been running for a couple of years....

June 13, 2011 · 3 min · alj

Ubuntu: Install Percona XtraBackup

Percona XtraBackup is an open-source hot backup utility for MySQL that doesn’t lock your database during the backup. It can back up data from InnoDB, XtraDB, and MyISAM tables on MySQL 5.0 and newer servers, and it has many advanced features. Commercial support contracts are available. For a high-level overview of the features, including a feature comparison, please see the XtraBackup homepage. Luckily installing XtraBackup is pretty easy...

June 13, 2011 · 1 min · alj

Natty Narwhal: Problems connecting to servers behind (Cisco) firewalls using ssh

After upgrading to Natty Narwhal I couldn’t connect to my Linux based jump host (connected via VPN): OpenSSH_5.8p1 Debian-1ubuntu2, OpenSSL 0.9.8o 01 Jun 2010 debug1: Reading configuration data /home/alj/.ssh/config debug1: Applying options for * debug1: Applying options for smallpox.xxx.dk debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to smallpox.xxx.dk [xxx.xxx.xxx.xxx] port 22. debug1: Connection established. debug1: identity file /home/alj/.ssh/id_rsa type -1 debug1: identity file /home/alj/.ssh/id_rsa-cert type -1 debug1: identity file /home/alj/....

March 21, 2011 · 2 min · alj

Ubuntu Natty: Making a Gobi 2000 wireless modem work

In the pre-10.04 days it was possible to make a Gobi 200(0) modem work by installing gobi_loader and using it to load the firmware for the modem. However, with the release of Ubuntu 10.04 (which sports a shiny 2.6.35 kernel) gobi_loader stopped working. Because gobi_loader (according to the homepage) does not support 2.6.32+ I stopped caring and used my Huwai stick instead. Recently one my colleagues noted that after upgrading to 10....

February 25, 2011 · 2 min · alj

Ubuntu Natty: Fixing the "mouse" on HP 2540p

Update: This fix is now documented in the Ubuntu Wiki After upgrading to Natty alpha 2 clicking left+right mouse no longer worked as middle mouse button (also known as Emulate3Buttons). Since version 10.04 (and for real since 10.10) Ubuntu no longer sports a xorg.conf file; all configuration is done through udev and evdev – for some reason the “mouse” (track point) in my HP Elitebook 2540p is detected as a three button mouse...

February 20, 2011 · 1 min · alj