snippets of blackwings life

Repair status of the earth-quaked trans-pacific fiberlines

As mentioned earlier, there have been severe disruptions to the Asian internet connectivity due to the Taiwan earthquake in late December. As connectivity is still quite slow I checked on the Net how the status of the repair is…

So here is the current situation of the pacific cables:

So Situation remains quite unclear. AFP reports, that situation is close-to-normal, but I disagree with that. Finally the Henchun earthquake shows, that even the “fault-proof” Internet protocol is not really perfect when all routes go through a single bottleneck.

To be precise: Almost all communication from Asia to Europe (and US) runs via the Pacific Ocean even though shorter links via the middle-east are present. This was also obeserved by CyTrap. As seen in the global submarine cable map the actual bandwidth linking South-East Asia via the Middle-East or Russia is quite low…

So Singapore suffered from severage outages even that the direct fiber-links to Europe were NOT affected at all! There is really a need for some direct routes via Middle-East in order to ensure a fault-protection and reduce impact of such one-spot failures as just seen. Additionally this way physically shorter, which results in lower delays. But of course the US-based Tier1 providers are not interested in such upgrades.

So the situation remains like this: Like flying via San Francisco / New York when you want to get from Singapore to Frankfurt…

My c-plugins for qmail-spp: rblchecks and greylist

In order to fight spam, methods such as using a dns-based realtime blacklist or greylisting have been proven effective.

I use qmail with the very useful qmail-spp patch-set, that adds plugin capabilities to qmail-smtpd. Instead of just adding more and more chained commands to the run; file of tcpserver, you just specify a small plugin that is executed by qmail-smtpd when a certain smtp command is issued. In fact, this method is way nicer than forking many programs in a row… My run-line for the smtpd grew constantly, due to addition of rblsmtpd, qgreylist, … and I started to really dislike the increasingly huge memory footprint of a single smtp session. So I started searching for a rbl and greylisting plugin for qmail-spp – preferably in c, because forking several perl-instances per smtp session is just overkill. What I found was:

  • greylisting-spp by Peter Conrad. His website indicated, that he claims greylisting-spp to be alpha-quality, so I kept away from using it (After writing my own greylisting solution and putting him into cc, he said that it is actually quite stable – but the website did not indicate it *argh*).
  • ra-plugins by Roberto Alsina. Great collection of plugins – including a rblchecks one. But unfortunately his implementation lacks whitelisting support.

Because of this I did some own implementation – rather small and in c. To be honest, both greylisting and rblchecks are based on existing ideas / implementations. I suggest the following usage in the [mail] section of qmail-spp:

Update: People keep asking me per mail, what kind of blacklists and so on I use: I use the and as blacklist and whitelist common mailservers such as, etc.

rblchecks.c – Check TCPREMOTEIP against a list of white- / blacklists.

Based on rblchecks.c of ra-plugins written by Roberto Alsina. Features & behavior of this plugin as follows (are README, and Makefile will be added at a later point).

  • If SKIP_RBL is set, plugin exits without doing anything (so following plugins in the chain will be executed)
  • The bstring library is used. So please have its header files present.
  • If TCPREMOTEIP is listed in one of the servers specified in the RWLSERVERS environment variable, plugin exits with A answer code. Please use tcp.smtp to specify the RWLSERVERS. Multiple servers can be supplied using : as separator.
  • If TCPREMOTEIP is listed in RBLSERVERS, plugin will exit with error 541 and qmail-smtpd will quit the smtp session.
  • Be sure to set a DNS timeout via resolv.conf In a future version, there will be an timeout handling within this plugin.
  • Plugin will give diagnostic messages via STDERR, so that qmail-spp will pass them to the logging system of qmail.
  • In case a IPv6 connection is found ($PROTO=TCP6) the plugin exits with a note – because IPv6 is not (yet?) subject to realtime blacklists.

greylist.c – Perform greylisting on TCPREMOTEIP.

This plugin was inspired by qgreylist by Jon Atkins. This implementation does a IP based greylisting – Sender and Receiver addresses are not taken into account! Right now there is just the c-file. Documentation as in README will follow.

  • If SKIP_GREY is set, plugin exits without doing anything (so following plugins in the chain will be executed)
  • Greylist creates an empty file named by TCPREMOTEHOST in the specified BASEDIR (default is /var/qmail/greylist) when a host is first seen.
  • A host, that is seen the first time gets a temporary 451 error.
  • After a minimum waiting time set via GL_MIN_REJECT (default is 300s) a SMTP session is accepted.
  • If host comes back before GL_MIN_REJECT, it gets an 451 again.
  • Once a session was successful, the entry has a lifetime of GL_ACCEPT_GOOD (default is 32 days).
  • If a host does not come back after GL_MAX_WAIT (default is one day), the entry is subject to cleanup.
  • On every subsequent SMTP session of TCPREMOTEHOST the file-access-time of the corresponding file is updated to the current time.
  • The modification time of the file corresponds to the time, when the host was first seen, while the access time refers to the time when it has been seen for the last time.
  • Be sure to have enough inodes in the specified BASEDIR! For high-volume servers you might consider using a ramdisk. But even for a server with about 15000 mails per hour, there was no slowdown. Best results have been seen on ext3 with htree, xfs and reiserfs. (I personally use a ramdisk with reiserfs on it. Do NOT use ramfs/tmpfs!
  • BASEDIR must be read-/writetable for the qmail-smtp user (usually qmaild)
  • Concept is also valid (and working!) for IPv6.
  • A clean-up cronjob for the BASEDIR is suggested. Just cleanup files, that have not been seen again within GL_ACCEPT_GOOD (now > atime + accept good) or that exceed GL_MAX_WAIT (now > atime +maxwait and atime == utime). A simple perl-oneliner does that:
    perl -e "my $time = time(); for my $file ( </var/qmail/greylist/*> ) { my ( $atime, $mtime ) = (stat $file)[8,9]; if ( ( ( $atime == $mtime ) and ( $atime < $time - 300 ) ) or ( $atime < $time - 2764800 ) ) { unlink $file or print "unlink $file failed"; } }"

skip-if-relayclient.c and skip-if-smtpauthuser.c – Simple plugins that stop further qmail-spp processing if RELAYCLIENT or SMTPAUTHUSER

The use of creating a kind of if-then-else handling in qmail-spp made me write these trivial little programs. So get them in front of your tool-chain in order to stop further plugins from being executed when you have a trusted sender!

  • If SMTPAUTHUSER or RELAYCLIENT are set, plugin exits using the A answer code (no further plugins in the chain will be executed)

Temple & mosque tour around Little India, Arab Street and Bugis

As it is my last weekend I decided to get on a walk for some sights I left out: Stuff like famous temples, churches and whatsoever. But first of all, I started my day at City Hall area in order to catch some Myanmar food at Peninsula Plaza. So I walked around that area afterwars but it started raining quite heavy so I decided to hit MRT and get to Farrer Park at Little India.

Gate of Srinivasa temple at Serangoon Road Surprisingly here, just about 3km from City Hall there was partially cloudy sky… So I walked down to the famous Sri Sirinivasa Perumal temple at Serangoon Road with its impressive gate and nice interieur. Nice to look at, but not for a long stay. After getting a Lassi at Tekka Market I proceeded to Waterloo Street in order to see the Kuan Yin and Sri Krishnan Temple. The Kuan Yin one was closed due to maintenance, but the Sri Krishnan one was open – and it is definitively worth to go there! Full of scultures and colorful paintaings this temple is probably the most “packed” one in Singapore.

To conclude this day I walked down to Arab street and had a tradtional tea. I was originally intended to catch some Muslim food in Kampong Glam, but most street restaurants were closed so I got back to bugis and had some Nasi Lemak with Chicken.

filed in singapore

Geylang district

This weekend was actually the last complete one that I spend in Singapore – because the upcoming Friday is my last working day and afterwards I will do trips around. So I used this weekend to do all the stuff in Singapore, that I forgot or left out. I woke up quite late on Saturday, because I was at a barbecue with co-workers on Friday. This was a lot of fun although it was raining like hell – Maybe this was the reason, why we had so much fun.

Burmese temple as seen from a chinese templeThe weather on Saturday was just marginally better – cloudy, but the rain died down. So I decided to head for MRT in order to get to Geylang district. After reaching at Paya Lebar station I walked back alongside the MRT tracks, cause I specced some nice temples rightby. A nice burmese-style Hindu temple right next to a chinese-style Buddha temple. Especially the Hindu temple is worth visiting – It was the only temple of this style I saw in Singapore. If you wanna visit them, go to Geylang East Av. 2.

DuriansAfterwards I walked down to Geylang road. The Geylang serai is one of the legal red-light districts in Singapore – But compared to red-light districts like in Amsterdam or Hamburg it seems more like a regular relaxed suburban street with traditional chinese two-storey houses…Have you been stoned? More interesting were the quite many Durian fruit stands along the road – You could smell it easily from blocks away! I proceeded walking down Haig Road until reaching Mountbatten Road in order to find some food. I finally got into some Malay restaurant ordering Laksa – Mostly because this restaurant had a long waiting queue. While walking along I saw this pretty funny “Have you been stoned?” ad of a stone-grill restaurant… Finally I walked back on Joo Chiat Road back to Geylang Road. This road is full of old chinese house which are nicely restored. When walking back to the MRT I dropped into the Geylang Serai market, which is full of excellent food-stalls, fruit and vegetable stands. So I got some Pisang Goreng (Malay style fried bananas) and some Mango pudding. At the market I also got a load of Mandarin oranges – very tiny ones and really really sweet. Right now they are sold everywhere – because they are a traditional give-away for Chinese New Year which is in 3 weeks of time. It seems like everybody around here is going crazy because of this – E

filed in singapore

Connectivity Singapore to Germany

First of all: It really sucks. These days the connection is so incredibly slow, that working via interactive protocols (e.g. ssh ) is virtually impossible – A ping roundtrip is around 350-450ms. This is actually not too bad, but jitter and loss really get me crazy – Sometimes connection is stuck for about a minute. In November lag & loss were quite acceptable – It was even possible to upload stuff with about 16kb/s – But right now were down to less than 2kb/s and frequent disconnects cause of too high packet loss. First I thaught, that the Uplink of NTU is just packed, so I took my Laptop and tried it at other locations. But even when you get on the net via Wireless@sg or other carriers, the situation is quite the same. Most of the slowdown seems to be related to the Taiwan earthquake in late December 2006, which cut down many fiber optic links in the Taiwan straits. I just found some news, that none of the cables has been restored yet. Other bloggers in the region also complain about lag & packet loss…

So lets get into some investigations, what’s really happening…

So let’s hope that they get the cables fixed soon…

Singapore Zoo

Orang UtansArgh. Another cloudy Saturday! But better than a rainy one… So I got myself ready for this weekend’s highlight: Getting to the famous Singapore Zoo. So I took MRT – a long ride from Boon Lay… First East-West-Line to Jurong East, then the North-South-Line up to Ang Mo Kio, which takes about 1 hour. To get to the Zoo, I jumped onto a 138 bus. When I arrived at Ang Mo Kio, a thunderstorm started, but when I reached Zoo it was already over – but cloudy conditions and high humidity stayed all day. So the photos are not that colorful, because of the diffuse light situation…
White tiger Flashed! Admission to the Zoo is quite expensive, but your 15 s$ are well invested money – You get a view of the most stunning Zoo I’ve ever seen! It is just more interesting to watch monkeys jumping around, when the surrounding vegetation is tropical. You get a nice view of a huge number of tropical animals in their natural habitat. I especially liked the rainforest hall, where countless butterflies and other animal where around. It was also nice to see white tigers and the working elephant’s show, where local mahouts show the working performance of huge asian elephants.

Aircon ShelterOne thing at the Zoo made me really smiling… Everywhere around the Zoo, there were so called: “Air-con shelters” – Little pavilions with air conditioning, where sweating tourists can get some rest from the tropical temperatures. One thing at the Zoo really made me mad: Charging 2s$ for a 0.5l of water is just not fair… But some friends told me, so I was prepared – Har!

Food with hall-matesAfterwards I met with some of my Singaporian hall-mates in order to have some nice food at the Salita Area. So Nick & Danny took me to some very nice restaurant, where we had a splurge menu of superb Hainanese specialties, such as the (in Singapore omni-present) Chicken Rice. After that we went to a nearby Hawker Centre for dessert. We enjoyed Ice Kachang and some other stuff.

Update: Many people keep me asking for more photos… So I put some more pics at flickr. So here is why my private gallery has still no pics: Uploading takes virtually forever – I get only some 4kb/s since this Taiwan Earthquake slowed down the net. So be patient. There will be a huge load of pics after I’m back – and probably also a presentation.

filed in on tour, singapore

Friday night at Marina Bay

Singapore Skyline as seen from EsplanadeAnother week at work passed by really fast – probably cause I was quite busy. Friday after work I decided to get to the city center in order to catch some food. But when I was sitting in MRT the cloudy sky got more and more blue, so I decided to get down to Esplanade at Marina Bay in order to get some nice sunset pics of the Singapore Skyline… I was quite lucky I think :)

Afterwards I listened to some of the Live Bands performing at the outdoor stage of the Esplanade. The punk music was quite nice and it was quite funny watching all these brave pseudo-punk sitting there listening…

filed in singapore

Book recommendation

Besides all the tour-blogging of my Singapore related stuff, it is worth mentioning that I found a lot of time during the last weeks to just sit down and read – Something that was pretty wiped-out during the busy last semesters in university. Probably you understand: After getting slammed by reading scientific stuff, sitting in the library and learning/reading, I was not really motivated to take a book and read for relaxing. So, here is my recommendation:

Planet Germany Eric T. Hansen, Dec 2006, in German
Book cover I got this book as Christmas present from my girlfriend – and she did a really good suggestion: This book is really a pleasure to read! The author itself grew up in Hawaii, but studied in Germany and is living there for about 20 years now. He is working as professional journalist now – And you can easily see that. Facts have been accurately collected and presented in a clear manner. Full of nice side-stories the author points out many typical German behaviors and critically analyzes the German’s habits. Most times you start laughing about the introductive story in a chapter, but when he clearly presents funny facts you actually start thinking. Topics like “Why do Germans always complain about anything?” or the topics about the German national identity are really interesting to read. This book is full of indirect provocation, social critics and interesting views – Presented by someone who is truly a proud American and who lived among these Germans, that always pretend to get americanized. Definitively worth reading!

Update: My girlfriend added, that this book was actually suggested to her by shutdown.

A weekend in Bintan, Indonesia

Blue patches I just came back from a chill-out weekend in Bintan Island, Indonesia. Together with Peter, Pascal, Marc, Timo & Wiebke I got to this nearby “resort-island” on an all-inclusive trip to a 4 star resort. Because it is off-peak time right now, this trip was quite cheap. Bintan Island is just on the other side of the strait of Singapore and besides Batam the gateway from Singapore to Indonesia. It is just one hour by speed-catamaran.
Cloudy Beachview We reached the resort around noon and unfortunately it was raining. Of course. Because it is not only off-peak time, but also monsoon time. Argh. But it was around 28C, so we decided to get into the pool anyway. This was actually a quite nice decision, because later on it stopped raining and the wind dropped down so we spent the whole afternoon at the beach. OK, it was cloudy – But the beach is really nice. Fine sand and nice scenic view – But with blue sky and bright sunlight… Time to stop thinking about that – Right now most people in Europe suffer from bad weather, so I do not complain.

After a splurge brunch at Sunday morning we had no chance to get out because it was raining really hard – So we started playing cards, which was really a lot of fun. It did not stop raining until we got back to Singapore in the late afternoon, but this did not matter at all. It was a really relaxing and enjoyable weekend – even with rain most of the time.

filed in on tour, singapore

Halftime – Planning the second half.

Time is running fast, really fast. Just today, it is half-time of my time overseas. Some people asked my, at what time I’ll be back, so here are the brief details:

  • Flight back to Germany: Tue 20.3.2007
  • Back to Erlangen: Probably Sat 24.3.2007

Actually my internship is also over quite soon – Only about 4 weeks are left! After the attachment is finished, I have the huge amount of 6 weeks left, which is available for traveling around South-East Asia. Quite many people asked me, what will be on my schedule for that time – So here is an overview:

In February, I’ll do some multi-day trips to destinations such as:

Then it is time for Chinese New Year – So I’ll be back at Singapore to celebrate this with friends. So at the 22.2.07 I’ll head for a backpacking trip around Malaysia. Although no detailed plans are done (and never will – Because this is subject to daily mood and weather), I plan to visit the following places (partially visualized at the map).

To summarize: Getting around the East Coast of west Malaysia starting in the very south to the very north and then get back via Cameron Highlands and Kuala Lumpur.

Powered by WordPress