Vor wenigen Wochen habe ich mich als ZEIT-Online-Kommentator registriert, und zwar, wie üblich, mit einer eindeutigen Mail-Adresse, die ich nur der ZEIT und niemand anderem zugänglich gemacht habe. Heute kam schon die erste Spam-Mail, die an diese Adresse gerichtet war. So schnell wie die ZEIT hat bisher noch niemand meine Mail-Adresse an Spammer weitergegeben bzw. es ihnen erlaubt, die Benutzer-Daten zu kopieren (auch nicht dieser Anbieter von Buchhaltungssoftware).
ZEIT-Benutzerdatenbank besonders leicht zu hacken?
December 24th, 2010Hilarious Papers
December 5th, 2010Recently, my facebook friends made me aware of highly interesting papers:
- Writer’s block: A study from 1975, and a cross-site followup from 2007.
- Discovery of integration by a medical doctor
The ideal names for Chinese cabinet members
December 5th, 2010Yesterday, my wife pointed out – in my opinion, correctly – that China needs a cabinet containing the following people:
- Mr. 胡 (he’s already there) – pronunciation: Hú
- Mr. 温 (Wén, also already there)
- Someone called 郝 (Hǎo)
- Maybe one should also have a 娃 (Wá) – although that’s not really a common last name.
This should pretty much cover all needs, shouldn’t it?
The U.S. are catching up
October 6th, 2010Today I found this in my e-mail (from Citibank):
Dear RAINER …,
Stop taking time out of your busy day to deposit a check, or waiting for checks to come through the mail. If you receive regular payments from your employer, a pension or retirement plan, social security or from just about anywhere else, then Direct Deposit is for you. With Direct Deposit, the money goes straight to your account and you’ll never have to worry about lost or stolen checks again.
Twenty years ago, when I was first confronted with the American obsession with checks, I was quite puzzled. I am glad to see that our American friends are slowly beginning to catch up. I was already beginning to think this would not happen within my lifetime.
OpenVPN: Sharing a port with Apache
September 15th, 2010Finally, I got OpenVPN to work on my server. A particularly cool feature is the possibility of sharing a port with Apache – this should make it harder for censors to filter OpenVPN packages.
“Sharing” is, however, a bit misleading, since no two applications can listen to the same port at the same time. For instance, to share Port 443, one has to make Apache listen on a different port. I made Apache listen on Port 8443, so I edited the ports.conf file to say:
Listen 80 Listen 8443
Now that Port 443 is not taken anymore by another application, we can make OpenVPN listen there. Any non-OpenVPN traffic that goes to this port has to be forwarded to Apache by OpenVPN. After all, we want to still talk to Apache by using Port 443, as one usually would.
This can be accomplished by putting these lines into openvpn.conf:
proto tcp port 443 port-share 127.0.0.1 8443
Explanation: this cool feature only works with TCP, hence the “proto tcp” line. Only OpenVPN listens on Port 443. However, any non-OpenVPN packets will be forwarded by OpenVPN to Apache, which runs on the same server and listens on Port 8443. So, from the outside world, it looks as if Apache and OpenVPN were both listening to Port 443, and whoever you intend to talk to will answer.
EHIC (European Health Insurance Card) not always honored in Finland
September 11th, 2010Yesterday, the municipal health center in Haaga (Helsinki) refused to serve a patient who showed up with a probably broken foot and a European Health Insurance Card which should have provided cover. Staff at the health center said they did not recognize the EHIC and could not provide any help.
This means: KELA’s promises about the visitor entitlements are, unfortunately, partially empty. If you decide to travel to Finland, better make sure you’re in robust health or have private cover or be prepared to go through some hassle and possibly visit more than one health center or hospital in order to finally get the benefits you’re entitled to.
Outi Sammalkorpi, chief physician of the Haaga Health Station, did not deem it necessary to react to a complaint about this incident. Mr. Sammalkorpi, if you read this, maybe you can post a comment? Why do you think EHIC holders should not be served?
P.S. Mr. Sammalkorpi sent some sort of apology about a month after the incident, though he completely avoided commenting on the blatant refusal to honor the EHIC:
Google translates this as: “
I have received an electronic letter that was sent 10/09/1910. Appointments Office workers are not seemingly understand you correctly. Care needs assessment would certainly have been done. If necessary, we have englanninkielentaitoisia workers. A few can also speak German.
Sorry about that. I hope that business is going Haga health center will be more positive note.
senior physician”
Configuring OpenVZ for IP v. 6 (in addition to IPv4)
September 8th, 2010IPv4 addresses are going to run out soon, so I decided to add IPv6 to my Debian (Lenny) servers running OpenVZ instances. The server and containers are now still reachable under their old IP4 addresses, but in addition also under IPv6. I am using the “venet” setup, not “bridged”.
Just a few steps are necessary:
- add this to /etc/sysctl.conf:
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.default.proxy_ndp = 1
net.ipv6.conf.all.proxy_ndp = 1
- add this to /etc/network/interfaces (in addition to whatever it says with regard to “iface eth0 inet static”); note that I am using two different prefixes, one for the gateway (2a01:xxx0) and one for the main server (2a01:xxx1). You’ll have to replace those prefixes such that they match your own gateway and server addresses.
iface eth0 inet6 static
# Haupt-IPv6-Adresse des Servers
address 2a01:xxx1::2
netmask 64
# Default Route
gateway 2a01:xxx0::1
pre-up modprobe ipv6
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/autoconf
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra_defrtr
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra_pinfo
pre-up echo 0 > /proc/sys/net/ipv6/conf/eth0/accept_ra_rtr_pref
# Host-Route, da das Gateway ausserhalb des eigenen /64 Blocks liegt
pre-up ip -6 route add 2a01:xxx0::1 dev eth0
post-up /sbin/sysctl -p # one address for each container:
post-up ip -6 neigh add proxy 2a01:xxx1::89 dev eth0
post-up ip -6 neigh add proxy 2a01:xxx1::90 dev eth0
post-up ip -6 neigh add proxy 2a01:xxx1::91 dev eth0
post-up ip -6 neigh add proxy 2a01:xxx1::92 dev eth0
post-up ip -6 neigh add proxy 2a01:xxx1::93 dev eth0
- in /etc/vz/vz.conf, set
IPV6="yes"
- Reboot. Now you should be able to “ping6 ipv6.google.com” from the main server and containers.
- If you don’t want mail originating from servers with IPv6 addresses to be rejected, add a reverse DNS entry for every server which is newly equipped with an IPv6 address, as well as a corresponding AAAA DNS record. Make sure this name is not already used for an IPv4 address.
Schufa: Vertrauen in übersinnliche Fähigkeiten?
July 21st, 2010Heute habe ich eine Schufa-Umfrage ausgefüllt. Am Ende wurde mir angeboten, an einer Verlosung teilzunehmen. Dabei fiel mir auf, dass die Schufa einerseits hoch und heilig verspricht, dass meine E-Mail-Adresse nicht gespeichert wird, weder durch die Schufa noch sonst irgendjemanden, aber andererseits auch, dass ich in etwa einem Monat per E-Mail benachrichtigt werde, falls ich etwas in der Verlosung gewinnen sollte. 
Mail notification with SSL on Ubuntu
June 16th, 2010Ubuntu by default comes with a neutered, useless version of the mail notifier. Luckily, Glyphobet posted the following script.
I found that the script would not run on my Ubuntu machine, so I went through it step by step manually (by entering line by line). This taught me that this script will only work if you have previously installed the package devscripts.
#!/bin/bash
# This script rebuilds the mail-notification package with
# –disable-ssl REMOVED so that mail-notification is ACTUALLY USEFUL.
if ls mail-notification* > /dev/null ; then
echo “This script will execute \`rm mail-notification*\` when it completes,”
echo “but there are mail-notification files in this directory already.”
echo “Please remove stale mail-notification package files and re-run this script.”
exit
fi
# Remember uninstalled build dependencies
BUILDDEPS=`apt-get build-dep mail-notification -s | grep “^ “`
# Get build dependencies
sudo apt-get -y build-dep mail-notification
# Get packages required to compile with SSL support
sudo aptitude install libssl-dev fakeroot
# Get package source
apt-get source mail-notification
# Get into the directory
cd mail-notification*/
# Remove STUPIDNESS
perl -i.bak -pe “s/ssl=no//” debian/rules
# Update the version so that the package manager doesn’t get its knickers in a twist
DEBEMAIL=”foo@bar.com” dch -i “removing line noise which prevented SSL support from being enabled.”
# Build package
dpkg-buildpackage -uc -us -rfakeroot
# Remove previously uninstalled build dependencies
sudo aptitude remove $BUILDDEPS
# Checking…
if ! ldd src/mail-notification | grep libssl ; then
echo “******** SOMETHING WENT WRONG! libssl support NOT ENABLED ********”
exit
fi
# Get out!
cd ..
# Install the living daylights out of the package
sudo dpkg -i mail-notification*.deb
# Clean up package rebuilding debris
rm -fr mail-notification*
Making websites faster: DNS and CDN
June 2nd, 2010Google announced that in their ranking algorithm, one of about 200 criteria will be the time it takes to load a page. So I tweaked my websites a bit, following Google’s and YSlow’s suggestions to gzip text files, combine CSS and JS files etc.
These two websites are especially useful for measuring website performance:
- Uptrends – nice, simple visualization for loading times as seen from different geographical locations.
- Webpagetest – shows times for first and for subsequent page loading actions. More details.
Two changes stood out because their effects were most noticeable in my case: using a Content Delivery Network (CDN) and paying more attention to the time it takes to resolve addresses (DNS).
Using Google’s Appspot as a CDN
For a long time, I thought that content delivery networks such as Akamai are only interesting for big corporations with correspondingly big spending power. But it turns out that Google’s application engine can be used as a reasonably powerful CDN that is either free (if the bandwidth is below 1 GB/day) or at least not too expensive (each GB above 1 GB costs just 12 cents). No programming whatsoever is required for using AppSpot as a CDN.
Documentation can be found here: http://code.google.com/appengine/docs/whatisgoogleappengine.html
Using an external DNS provider
So far I ran my own name servers. I liked having control over this, and I figured, since I already pay for servers anyways, why not also use them for DNS. The drawbacks of my approach were:
- DNS servers were in the same computer centers as the servers. Thus, if the whole computer center experiences a downtime, it is impossible to reroute the traffic elsewhere if the DNS servers are subject to the same problems.
- DNS requests do add load to the servers!
- From my own country, the speed was okay, but DNS resolution turned out to be a bit slow from other continents.
To address these issues, I tried two external providers: Zerigo and DNSmadeeasy. Both of them turned out to reduce the time it takes my visitors to resolve names, that is, both made my websites faster. This effect was stronger for countries that are further away from my servers. Individual strengths and weaknesses:
Zerigo
What I like about Zerigo: DNS servers not only in the US but also in London and Vienna. Nice user interface. Easy-to-use slave mode: I keep using my own DNS servers for the purpose of defining and managing zones. But I enter only Zerigo servers in the NS records and at the domain registrar. Therefore, all requests from the public can go to Zerigo’s fast and geographically dispersed servers, while the way I manage my domains on my own DNS servers does not need to change at all.
What I dislike about Zerigo: DNS requests are relatively expensive (1 million per month is included in their “small” account for $1.58 per month, but each additional million costs $3).
DNSmadeeasy
What I like about DNSmadeeasy: a “slave” setup similar to Zerigo is also possible. Instead of 1 million per month, 5 million requests per month are included (with the account that costs $29.95 per year, thus the price per million is only $0.50 as opposed to Zerigo’s $1.58).
What I dislike about DNSmadeeasy: The user interface is clunky and ugly, which makes managing, importing and exporting DNS records harder than at Zerigo. This is mainly an esthetic problem, though – the necessary functionality is still there.