Zyxel P-660HW-T1 vs IPv6 tunnel vs SIP

I’m a SIP/VoIP user.  It allows me to make international calls for the cost of a local connection.  I have set up a Linksys PAP2T gateway with a regular phone connected to it. Worked great for calling out.  Unfortunately, the SIP gateway kept on logging out of the SIP server.  It could last a day or an hour, but it would always eventually lose the logged-in state and never return to it without human intervention.  Resetting the gateway would not help, it was usually necessary to switch it off for 15 minutes or so.  A quicker method was to change the SIP port from 5060 to 5061 and back every time I needed to restore the service.  I tried fiddling with the PAP2T settings, but no setting changes seemed to alleviate the issue.

I’m also a an IPv6 user.  I’ve got an OpenWRT installation on WRT54GL, running aiccu and providing an IPv6 tunnel from SixXS.  The tunnel had a similar ailment: it would go down every couple hours to days.  The workaround was to restart aiccu.  I would restart it when I needed it.

At some point, I started neglecting the IPv6 tunnel.  I didn’t need to use it, and I just didn’t bother to restart it.  At the same time, I noticed that the SIP gateway would stay logged in without dropping out for much longer than usual.  This state remained for about two weeks, until I needed to reinstate the IPv6 tunnel.  Right after doing that, I walked over to the SIP gate and… noticed that it had dropped out.  Correlation does not imply causation, but you know… it raised my suspicion.  What is it that these two devices have in common?  The router!

A search on Google for “zyxel sixxs sip” revealed a forum post, in which someone described the same symptoms I had, with a bit of diagnostics.  Both the IPv6 tunnel and the SIP service are using UDP, which is harder to NAT than TCP.  The Zyxel router would repeatedly get confused and misinterpret the IPv6 related UDP packets as SIP packets and vice versa.

The solution was to take away the logic out of the Zyxel router and make it act as a DSL modem only. I’ve reconfigured it to the bridge / transparent mode, and moved the NAT logic to OpenWRT.  I initially wasn’t sure how the bridging mode works, but it turned out to be simple enough.  What’s nice about my particular setup is that I have a static IP address.  The setup uses a /30 network block, so it’s effectively using up 4 of the IPv4 address space.  It’s essentially a 2-bit netblock, so we can use 0, 1, 2, and 3 as the addresses.  In practice it can be something like, and any CIDR calculator will tell you, that if your netmask is /30 (or, then it’s a 4-address network starting at and ending at Let’s consider the NAT mode first.

  • 0: netblock address
  • 1: the router tells you it’s the the remote side (the gateway)
  • 2: the router’s public IP address
  • 3: the broadcast address
It might look like the 1 address is remote, at the ISP side.  But if you configure your router in a bridging mode, you have 2 devices, and they both have public IP addresses.  Let’s call them Zyxel (acting as a DSL modem) and OpenWRT (doing NAT).
  • 0: netblock address
  • 1: the Zyxel router’s address (gateway)
  • 2: the OpenWRT router’s address
  • 3: the broadcast address
So what you might have thought of as the remote IP address, is your local router’s address.  What was there left to do, was configuring NAT on OpenWRT.  Linux knows how to interpret incoming UDP packets, and both my SIP gate and IPv6 tunnel are working correctly now.  Plus, I have more control.

3G in the Netherlands: Telfort sucks, Vodafone rocks

Warning: this is a long and boring rant.  If you want the executive summary, here it is: If you’re in the Netherlands and want a 3G data connection, get a SIM card from Vodafone, they offer an excellent service.

While visiting Amsterdam for a couple days, I thought it would be nifty to have a local SIM card with data transfer. I would put it into my Android phone, and be able to use Google maps, read restaurant and museum reviews, and update my twitter feed if I came across anything interesting.

Shortly after having started to look for a cell company shop, I came across a Telfort store. They said they can sell me a SIM card with data transfer, and that the rate is €0.05 per 1kB.  I thought it’s a ripoff, but fair enough, if that’s their offer, and I need this, I’m willing to accept for now.  I purchased the SIM card, and asked for configuration details.

“What phone do you have?”
“G1, it’s an Android phone.”
“I can’t find this on our website.”
“It’s similar to… let me see…” – I looked at their phone model list – “HTC hero. Whatever works for Hero, will work for my phone too.”

The store assistant found the instructions and printed them out for me.  I’ve entered the configurations, but my G1 couldn’t make a connection.  The store assistant told me that she can’t help me.  I was running out of time, so I decided to try again in the evening.  I asked a friend who knew a bit of Dutch to help me around the Telfort website; we found all the configuration details again, and also a number you need to call to activate the SIM card — the store staff didn’t tell me about that.  I tried again a few times, and eventually gave up.  I paid the Telfort store a visit the next day. There was a different assistant this time.

“Hi, I bought a SIM card here yesterday, and couldn’t the data connection to work.”
“What’s the model of your phone?”
“It’s a G1.”
“We don’t sell that phone.”
“I think it’s a problem with the card, not the phone.”
“We never have problems with SIM cards.”
“OK, but can you check my SIM card for me?”
“We don’t have a phone here to check your SIM with.”
“I have another phone, which works with data connection, see here…”

I showed them a working 3G data roaming connection on another phone. I then replaced the SIM card with the Telfort one, entered the configuration and showed that the data connection didn’t work with Telfort’s.

“But we don’t sell that phone either”, said the assistant.
“I showed you that your SIM card didn’t work with two phones, and I’ve shown you that 3G works with one of them with another SIM. You’re saying that even though my G1 worked fine in Ireland, Portugal and Poland with local SIM cards, it doesn’t work with Telfort because you don’t sell it? And you can’t check with another phone because you don’t have a phone in your store?”
“Sorry, we can’t help you.”

Disgruntled, I left the store. I turned on the roaming in the other phone, and paid a small fortune for a couple of Google Maps segments and a search for “Vodafone.” Quickly enough, I arrived there, and the conversation went like this:

“Hi there, I would like to buy a SIM card, and I would like to use it for Internet access. Do you have such a thing?”
“Yes”, said the assistant, “It’s €7.50, and the Internet access is €10 for 30 days.”
“Any transfer limits?”
“No, there are none.”
“Cool! My phone is nonstandard, but it’s similar to HTC Dream, so the configuration should work with my phone.”

The assistant printed out the HTC Dream instructions, which contained all the right information: APN name, username, password, proxy server IP address and port. Then he took a booklet, browsed it for a few seconds, then opened it, handed it over to me, pointed at a bit of text and said:

“This is how to enable the Internet connection. You need to send a text message to this number, as descibed here. Before you can use it, you need to top up. I don’t have vouchers right now, but there’s a shop around the corner which will let you top-up.”

I paid and left. Got the top-up in the other store, then sat on a bench. I configured my phone, topped up the account, sent the text message and voilà! The 3G connection worked. I happily used it throughout the stay, and then left the SIM card with a friend, who enjoyed the 3G data for the remaining period of time.

Yey Vodafone!

By the way, a SIP voice connection over 3G worked just fine.

“Hi grandma, how are you? Good, good, I’m sitting in a café in Amsterdam…”

One more reason to praise Dreamhost

Few months ago, I’ve decided to try out a Xen virtual server service in a German provider, xencon. Then I decided I had a better solution (also Xen-based), and I don’t need xencon any more. However, it turns out that it’s not so easy to cancel the service. I had similar problems with two telecom providers in Poland. I said I want to cancel the service and they kept on billing me.

Dreamhost however, is awesome: if you want to, or need to, you can actually close your Dreamhost account on-line! They kindly ask you “Please, stay!”, but you have a button to press, stating that you really want to close your account.

This is by itself an excellent reason to open an account there.

Chinese Nigerian Scam

Do you remember your first Nigerian scam? Mine was circa 2000, if I remember correctly. How didn’t it die out yet, is a mystery to me. Anyway, I just saw something interesting: a Nigerian scam going Chinese! See this:

fromANGANG STEEL <i…@chinamade.com.cn>reply-toinfo_angangsteel1@yahoo.com.hk,

Dear Prospective Representative,

I am David Wan. Personnel Officer to ANGANG NEW STEEL COMPANY LIMITED,China. We are a company that deal on steel product and export worldwide Presently, we are faced with some problems most especially with our Payment methods as most clients we have prefer to pay us with cheque rather than cash. We find it very cumbersome in accepting such payments due to the new monetary policy in our banking systems here in China and this is crippling our business and that is why I am contacting you now.I am looking for a man/woman who is trustworthy to be in charge of receiving payments on my company’s behalf in his/her country.if you know you are not trustworthy please do not bother to reply at all because alot of money is involved here.all I am asking you is if you would like to earn for the first 60days Reps will receive 10% commission on every transaction processed.

If you are interested endeavour to furnish us with your following informations

1.Full names
2.Phone number/fax
3.Full address(NOT P.O BOX)
6.Marital Status,
7.Present occupation(Company And position)

Thanks In advance

Yours sincerely,
David Wan.
Personnel Officer to

If you wonder what it is all about, read about advance fee fraud. There are people who like to play with it, scambaiters. I never dared to do this, but I think it might be a form of hobby.

Blogging in the English world

After a long period of non-blogging, people often explain why was that and promise to blog more, just as if it was some kind of an obligation. I know it’s not, but still I’m going to fall into this pattern and write about not writing.

Which isn’t quite true; in fact I’ve been quite steadily blogging all this time, in my native language: Polish. There are two main reasons for doing so:

  1. I seem to have a couple devoted readers of my Polish blog: family and friends. I tried to switch into blogging in English, but apparently, they don’t see the me that they used to know when they read me in English. Or whatever the reason was, my friends just wouldn’t read and respond to equivalent posts in English. Blogging in Polish was (and is) more rewarding.
  2. I don’t have anything interesting to say in the English-speaking world. How come I have things to say in Polish, you ask? Well, I just translate or comment on things I’ve read in English! There are far more interesting things to read in English than in Polish, and I’m trying to bring at least at a glimpse of them to my fellow Poles. I’m sometimes writing original posts, but they happen to be hermetic and making sense only among my Polish friends.

It’s not that I don’t see any good things from blogging in English. To point out a few:

  1. Good practice in using the language. Although I have opportunities to speak English now, writing is something that trains a different angle of the language use.
  2. Since I live in an English-speaking country now, it makes sense to have an active English blog as means of getting to know more people, and perhaps even making friends.
  3. Occasionally, I do have something interesting to say in English. By habit, I write it in Polish and never translate it. I could translate from Polish more often.
  4. My English blog used to be more of a „tech notes” kind of blog. I think I will still use it to post solutions to problems I solved. Now, mixing personal ramblings with tech notes doesn’t seem like a good idea, because readers interested in personal stuff will be annoyed by those small posts about some Linux command working this way or other. Splitting blogs seems like a sensible thing to do, but I’ve got 3 blogs already and don’t want to multiply entities beyond necessity.

For now, things are going to stay the way they are. Maybe someday I’ll actually have something interesting to say in English. If I do, you’ll find it on my blog.