Choose color scheme

About the Author

521 Posts By ben

  • Verizon’s 4620L, a great device for the technically inclined

    My family recently moved to a fairly remote area, the question of internet access has been a major one for the couple of months leading to the move. Besides satellite & dial-up, our only option was Verizon’s MiFi (3G or 4g if you’re lucky) in the form of a hotspot device: the 4620L.

    I was afraid that the 4620L would try to be too smart and not let you tinker with it very much, very few decent reviews are available online and the official documentation is seriously lacking. Fortunately this couldn’t be further from the truth, it is a great little device that performs well and lets you turn all its knobs.

    When using “USB tethered mode” I was afraid I’d need specific drivers and a software suite running but lo and behold, it actually just pretends to be an ethernet device over USB. Absolutely perfect to put a Linux router in front of it!

    One thing that did not get properly QA’d is the “Enable DCHP Server” checkbox which simply doesn’t work. But guess what, I want to do my own routing and I’d like to avoid NATing from the 4620L to the Linux router. One way to circumvent this is to use the “Config File Download” and “Config File Upload” options which are meant as a way to backup & restore configuration but since the file is all intuitively labeled XML it’s easy to disable the DHCP server from there.

    While you’re in there, you can also override the maximum number of “Available Wi-fi Connections” (5 when using 3G). They probably have this restriction so regular Joe user doesn’t hook a gazillion device and complain about speed over 3G. Reaching this limit is very easy nowadays.

    A new mission

    Verizon’s plan is pretty pricy and very metered… All we get is 5GB per month, each additional 1GB will cost us $10. Ouch… I need to configure the network to consume as few bytes as possible. Netflix is out, AdBlock is in, automatic updates of various types are out. Above all, my home server will now be doing some serious routing, the goal of which is to allow devices to be on the home intranet while minimizing their use of the internet.

    No inbound connection

    That’s right, the IP you get from Verizon is in the private range (RFC 1918), this means they are doing some NATing of their own. You can forward ports all you want on your 4620L this will have no effect. Your only option is some cumbersome hole punching.

    We’ll be talking routing in a next post, I would have liked to find this information about the device & Verizon’s setup so I wanted to put it out there sooner rather than later.

  • New England commuting

    Bicycle


    kayak


    free bus without hobos

    And of course, car

    More to come…

  • Rain

    My beautiful wife having more balls than me.

  • Removing the accident

    Further inspection showed that the comb on the floor was most likely a mis-attached comb that fell from a top-bar. The bees weren’t exactly expanding on it but they weren’t removing it either, it was time to give them some help. Doing so was like playing a game of Operation but it went very smoothly and the beesĀ  were very docile even though I was digging pretty deep in their hive.

    Not much in this wreck of a comb but the bees were still tending to some brood in there.

    Going at it very carefully.

    I’ll leave them to clean the remaining pieces.

    Eventually one of the back bars that I had set aside was abandoned of all bees so… I just took it! Not necessarily the best thing to do but I was very eager to taste what the bees were up to. And it was delicious.

    From comb,

    To sweet nectar.

    It tasted very much like a mix between sap & honey, super good.

  • Honey & an accident…

    I inspected my hive today and it’s doing great. I drilled a few holes in the part that is currently uninhabited to give the bees some air. I did it early in the morning to lock them inside for the drilling, they took it really well and didn’t care a bit about the ruckus, even after I released them. I continued on merrily with the inspection as if nothing happened.

    A few holes for aeration in the middle of the hive, I stapled netting to prevent robbing and to make sure they don’t become an entrance.


    Honey!

    Today’s surprise though, came with the presence of comb on the floor. I’m not sure if this fell from one of the top bars but I doubt it. I don’t know what to do with it right now, I’ll monitor the situation and decide later whether to remove it or not.

    The mess

  • Change default home Unity lens

    Because we don’t necessarily want the home lens to be the default one in Unity, and unlike other lenses it is hardcoded left & right. Here’s a little trick that will let you pick a different lens as the default for when you click on Dash.

    edit the file: /usr/share/unity-2d/shell/dash/Dash.qml

    replace line 79 “onDashActivateHome: activateHome()” by “onDashActivateHome: activateLens(X)” where X is the index of the lens you want to load (count from left to right starting from 0).

    You’ll want to restart Unity for this to take effect.

    Done!

  • They’ve already built quite a bit!

    [flv:http://ben.akrin.com/wp-content/uploads/2012/05/IMG_0937.MOV.flv 640 480]

  • Loopback & crypt: a filesystem, within an encrypted partition, within a file

    So here we are, 2012 and physical media are going away really fast. We won’t even talk about CDs which have been relegated to the role of plastic dust collectors; hard drives even are being abstracted by a myriad of cloud based solutions. Their purpose is shifting towards a container for the OS and nothing else. Filesystems & their hierarchies become hidden in a bid to remove any need to organize files, rather, you are supposed to throw it all up in the cloud and search on metadata.

    While moving away from physical media is convenient and inevitable, I like the hierarchical organization that directories provide. What’s more intuitive than a labeled container with stuff in it?

    How can we detach our hard drives from their physical shells, move them around in an omnipresent cloud and keep them secure?

    By creating a file, attaching it to loopback & creating an encrypted partition in it!

    Here’s how to do it
    • Create a file that will be your soft hard drive with:
    dd if=/dev/zero of=/tmp/ffs bs=1024 count=524288

    This will create a 512MB file (524288/1024).

    • Make sure that the loopback device #0 is free:
    losetup /dev/loop0

    You should see something telling you that there is “No such device or address”.

    • Attach the soft hard drive to the loopback device:
    sudo losetup /dev/loop0 /tmp/ffs
    • And then make sure it was indeed attached by re-running:
    losetup /dev/loop0
    • Create an encrypted partition on your attached soft hard drive:
    sudo cryptsetup --verify-passphrase luksFormat /dev/loop0 -c aes -s 256 -h sha256
    • Open your encrypted partition:
    sudo cryptsetup luksOpen /dev/loop0 ffs
    • Create a filesystem in it:
    sudo mkfs.ext3 -m 1 /dev/mapper/ffs
    • And mount it like a regular disk:
    sudo mount /dev/mapper/ffs /mnt
    • When you are done using your encrypted soft hard drive you will want to umount it:
    sudo umount /mnt
    • Close it:
    sudo cryptsetup luksClose ffs
    • Detach it from loopback:
    losetup -d /dev/loop0

    These steps can be automated of course. As a quick reminder, using the drive goes “loopback attach -> crypt open -> mount” and when you’re done it’s “umount -> crypt close -> loopback detach”.

    That’s it! media-less & secure storage.

    Tested on: Ubuntu 12.04 64b