Archive for the ‘technical’ Category

Linksys WRT610N IPv6 support fiasco

Sunday, April 5th, 2009

A few months ago I bought a Linksys WRT610N router to use at home, I installed it, it worked flawlessly on my home network and get this IPv6 started working out the box with 6to4! I was happy as I could ever be :P

Now, a common saying is, if it works do not fix it, which is good and all except when “fixing” it actually means closing security holes and such. Also that being adventurous on you home network is not exactly a big professional risk (except angry spouses and such). So when I saw that there was a shiny new firmware upgrade available for the perfectly working WRT610N, I just had to upgrade, especially when the change log included a wealth of potentially important fixes such as:

– Resolved wireless connection drop issue.
– Resolved Wi-Fi Protected Setup interoperability issue.
– Resolved same internal ports not allowed issue in port forwarding feature.
– Resolved USB storage handling issue during large file transfers.
– Resolved IPv6 and other security issues.
– Resolved FTP server anonymous login issue.
– Resolved other minor issues.
– Improved timing of push button initiation.
– Improved recognition of USB external hard drives.
– Enhanced wireless range.
– Updated the FTP server.
– Updated the UPnP media server.
– Added support of Internet type detection to Linksys setup wizard.
– Added Home Network Defender support.

I thought it a little bit funny that IPv6 and “other security issues” were coupled on the same bullet point, but did not read into that my setup would be crippled (who would have guessed). Installed the firmware v1.00.02 B10 onto the router, and started to check if everything still worked. It seemed so at first, IPv4 worked as it always had, IPv6 could connect out, but incoming connections were rejected. Testing from a machine in a different location revealed that the packets were rejected with “Destination unreachable: Administratively prohibited”. My first thought was “Nice! IPv6 firewalling as default, good for them! Now how do I turn it off?”. Going through the routers web-interface I found nothing, leaving me unable to connecting to my home network.

To make matters worse I have several IPv6 routers at home which for some reason have lower priority than than the WRT610N as default, which was fine until the firmware upgrade.. For me that meant other IPv6 routes stopped working. Ugh.

Browsing the Linksys/Cisco homepage for clues made me end up in some sort of an expert system that asked me a lot of questions, which led me nowhere near any answers about uncrippling IPv6 on their product. In the end, it caved in and gave me live support through a webchat, neat! Unfortunatly, my frustrations did not end there..

I explain the problem, and get the response that “I am afraid linksys router only work with IPv4.”, you know nothing rude or anything, except that their product is actually broadcasting support for IPv6, and it worked before, they changed how it worked and is now telling me that there exist no such support at all. Of course I press on, maybe she just did not understand my problem, maybe my English was bad, maybe she just did not know the product.

I kindly point at the change log and the mentioning of IPv6 there, I mean, if there is a change with IPv6 in the product, that hopefully means that there must be some kind of magic IPv6 support in it, right? WRONG! “I am afraid it does not work with IPv6.”. Ask her to ask someone else again, you know, just maybe someone in their tech support would understand what the problem is. To me it is important to be understood so that I can get a proper answer, an answer that just brushes you off is just going to annoy me. At this point even an acknowledgment that there is a problem or that they are aware of the issue would have left me more than satisfied. “I consulted my senior technician for this but i am afraid that it does not support IPv6.”. Finally, I give up, I try to ask if it is safe to downgrade the firmware, but did not get an answer for this.. oh well.

To be fair, in the product sheet for WRT610N it does not say that it supports IPv6 in any way, and I did take it as a bonus that it did in fact work out of the box, which is why I recommended it to all my friends. I looked at OpenWRT for support, although it does seem that it is still a long way to go (lack of wireless support).

I wish development road-maps would be more available for firmwares, I guess I have been a bit spoiled with open source projects ..

Filesystem namespaces

Monday, March 5th, 2007

Playing with namespaces in Linux is something that has been on my todo list for a very long time, and now I have finally made use of some spare time and energy I had. So, what is a namespace? Well, for those used to programming and such a namespace is just that: a space for unique names, in other words we will not have the same name for different things within that a namespace. For example “/home/user/myfile” and “/home/user/myfile” will not reference different files as long as it is in the same namespace at the same time. We are used to this being true in more or less all systems, however, if we had two applications running in different namespaces we could have mounted a different file-system on /home with completely different files in them in one of them.

What can we use this for? Some ideas of the top of my head; some services might not need to have /home available, so why not unmount it from its namespace? Make every user have their own /tmp? Maybe even making other users directories not visible with some wizard bind mounting tricks .. these are not new ideas, see how pam_namespace can help you achive this.

This if course begs the question of how do I detect that my namespace is different from the rest or if some other process is running in a different namespace? Rest assured this is easily done, just check /proc/$PID/mounts vs /proc/self/mounts.
So how do you create a new namespace easily? I havn’t really found a user utility to start new process in a new namespace, so if you do please leave a comment. But it is not very hard to write one, this small C-program should do it:

execvp(argv[1], &argv[1]);

And in compilable form: newns.c (gcc newns.c -o newns). You should now be able to execute “newns yourfavoriteshell” and have yourfavoriteshell running in a new copy of a namespace. To check that it works you could unmount /home f.ex. in this new shell, exit and then see that it is still mounted, fun huh?

When the last process in a namespace exits all the mounts in that namespace is of course unmounted, so you should not worry about namespaces out of your reach too much. But it should be noted that if I mount a tmpfs somewhere within a namespace A, how can I reach that mountpoint from outside that namespace? I havn’t been able to figure a way of doing this yet, altough, what you really want to do is join the namespace making it available to your chosen process. There really is no way of enumerating the namespaces either.. so, how do we get into one of the processes of the namespace? Well, we could always debug it, for example run gdb –pid process and x system(“mount someplace ; copy intersting files out”) .. well, it is a thought anyways .. it is not as straightforward, because you cannot rely on functions behaving the way you want running in an enviroment you do not control .. but, being realistic if an attacker already has root, you can often be kept out of the system so that you loose whatever the attacker is keeping from you. Anyways, I may get back to the issue a bit later ..

An open mobile that does what you want

Friday, January 5th, 2007

The FIC Neo1973 is probably going to be release this month (January 2007). For those of you that don’t know this is a mobile phone which can run any software you want, just like any other computer. In other words it is not limited java applications or any specific operating system, you can actually choose (yes you read correctly). Now of course, this means that the operating system have to support that architecture and have drivers for all the hardware connected, but as luck would have it Neo1973 will have available sources (linux). As many of you know I’m a Linux enthusiast so it should not surprise any of you that I’m very keen on getting my hands on this lovely device. Of course running an open source operating system means we need more than a kernel, we need userspace applications (or it could get really boring really fast) which is just what a distro OpenMoko aims to do.

What is nice about having an open platform is that nothing is literally stopping you from fixing those annoyances or implementing those features that your phone needs; Example: Ever wanted an adaptive profile that measures the environment before choosing how loud that ring tone is going to be? Virtually all mobile phones have the needed hardware to do it, but no-one gets to make applications that use the hardware in that way because it is all closed down. Easy hack to do it, in code that tells the user about the incomming call or message: insert check for noise level through the microphone, set volume or way of notification accordingly.

When talking about a new mobile phone, one should always talk about the hardware right? right? Well, I guess the best source of information right now is OpenMokos own homepage, but to sum it up as it stands now: 2.8 vga touch screen, gps (pretty cool right), maybe bluetooth, 128mb of ram, gsm. Will be other versions of the phone later with more hardware snacks, you bet I will blog about it!

Got any killer features you want in a phone, give a comment here, I may even implement it (if no one gets there before me).

Wonderful world of grub2

Monday, November 20th, 2006

Sometimes I take my hard drives and juggle them up into the air before I put them randomly back into my computer. Well, perhaps not, but putting in a new drive or doing a BIOS update can do pretty much the same thing to the ordering of your disks. This is why most “techy” people (you know those that juggle their disks up into the air) end up with some sort of volume management, and in my case LVM. This makes it possible to have volume names rather than drive + partition number decide what is what. Now this only solves half the problem, because you still have to boot of a random drive. This is where grub2 shines (for me atleast), latest version (of this writing) actually supports having the boot partition (containing your kernel and grub configuration files) on an LVM partition. In other words we can use this to juggle as much as we want without having to update our bootloader all the time (more…)