Archive for the ‘Blog’ 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:

unshare(CLONE_NEWNS);
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 ..

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…)

Yip, my first post

Monday, November 13th, 2006

Okay, I said I would update my page, very very soon when I took it offline last time, that was about 5 years ago .. Now a friend of mine said that I would use less than 15 minutes getting this wordpress up, unfortunatly he was correct and now I have to keep updating this thing.. :P Hopefully I’m going to add some content here :) For those wondering it was Christian who tipped me on this..