Jimmy's weblog


DNS hack for VHCS

Filed under: — jimmy @ 12:10 am

Today I’ve uploaded the first version of my DNS hack for VHCS. It’s available on my homepage. With these scripts you can maintain a second DNS master server automatically.
Direct Link: www.g-tec.co.at/vhcs-patches/vhcs-dns.tar.gz


Accessing mysql through ssh tunnel

Filed under: — jimmy @ 8:42 pm

Usually the mysql server is configured not to allow network connections. Recently I had to find a way to allow connections over the internet, even the root account should be able to connect. I decided to use a ssh tunnel and configured the mysql daemon to listen on Additionally the mysql port (3306) is blocked by the packetfilter.
Thus I had to add the “bind-address” option to /etc/mysql/my.cnf:

user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
bind-address    =

Furthermore I had to comment out “skip-networking”:

# skip-networking

Otherwise mysqld would only work with sockets and not with TCP/IP connections.

To start the ssh tunnel run:

ssh -N -L 3306:localhost:3306 jimmy@mysql_host.com

Now connect to mysql with:

mysql -h

Use, not localhost, when connecting to the server. Otherwise the mysql-client will try to connect to localhost, without using the tunnel.


du and exclution of directories

Filed under: — jimmy @ 10:54 pm

Did you ever need to use du with the possibility to exclude directories? I recently had to calculate disk usage for webhosts, but without log files and backup files. After some minutes of playing I found out that “pattern” doesn’t match full pathnames, damn. But this posting shows how to patch the source of du to match pathnames. There’s only one line to edit!
So I fetched the source of coreutils and compiled everything. Instead of “make install” I only copied the du binary to /usr/bin/newdu, to keep my debian stable clean :-) Works great.


Linuxtage Chemnitz

Filed under: — jimmy @ 2:56 pm


Due to a lack of time (again *grml*) I can’t write much about the event, except one thing: It was as perfect as every year :-)

Here are some pictures of the event:
Gallery of “Linuxtage Chemnitz 2005″