DD-WRT and the dlink DIR-825

February 21, 2012

I’ve been needing to upgrade routers from my WRT-54G for a long time.  The old router worked just fine, but the CPU was too slow and I couldn’t use WPA2-personal for security, leaving me stuck with WEP keys.

I’m also a big fan of DD-WRT.   After careful study of the stats on the supported devices I settled on the DIR-825.  64M RAM, 8M flash, a 680Mhz Atheros processor, dual radios AND 4x1G ports.  A killer device.

I immediately flashed it with the latest DD-WRT firmware upon receipt but ran into a devious little issue.  My wireless and wired connections were reset with high frequency.  Large downloads would fail, youtube videos would hang and not finish.  Totally unacceptable.  I tried flashing with a variety of firmware versions, none of them giving me a fix.

Finally, I enabled ssh on the router and syslogging.  I started tailing /var/adm/messages and noticed the following, every 5 minutes:

Feb 20 20:14:30 DD-WRT user.info syslog: DDNS : inadyn daemon successfully started
Feb 20 20:14:30 DD-WRT user.info syslog: vpn modules : vpn modules successfully unloaded
Feb 20 20:14:30 DD-WRT user.info syslog: vpn modules : nf_conntrack_proto_gre successfully loaded
Feb 20 20:14:30 DD-WRT user.info syslog: vpn modules : nf_nat_proto_gre successfully loaded
Feb 20 20:14:30 DD-WRT user.info syslog: vpn modules : nf_conntrack_pptp successfully loaded
Feb 20 20:14:30 DD-WRT user.info syslog: vpn modules : nf_nat_pptp successfully loaded
Feb 20 20:14:30 DD-WRT user.info syslog: wland : WLAN daemon successfully stopped
Feb 20 20:14:31 DD-WRT user.info syslog: vpn modules : vpn modules successfully unloaded
Feb 20 20:14:31 DD-WRT user.info syslog: vpn modules : nf_conntrack_proto_gre successfully loaded
Feb 20 20:14:31 DD-WRT user.info syslog: vpn modules : nf_nat_proto_gre successfully loaded
Feb 20 20:14:31 DD-WRT user.info syslog: vpn modules : nf_conntrack_pptp successfully loaded
Feb 20 20:14:31 DD-WRT user.info syslog: vpn modules : nf_nat_pptp successfully loaded
Feb 20 20:14:31 DD-WRT user.info syslog: wland : WLAN daemon successfully started
Feb 20 20:14:31 DD-WRT user.info syslog: WAN is up. IP:

Digging a little deeper I found that by default the stateful firewall, which I was using, blocked DHCP renew requests.   So the dhcp client daemon would restart the network interface every 5 minutes.  I always retained my IP but the router would stop/start the WAN interfaces as a part of this process.  The fix?  Add an iptables rule to the router:

iptables -I INPUT -p udp –dport 68 -j ACCEPT

It’s all documented here.   Since I made the change, everything is clean and functioning rock solid.   Yea!


Another synchronicity

April 2, 2011

Last night I was flying home from a business trip.  I got in around 1 AM.  Upon de-planing, I made my way out of the terminal.  I situated myself on the upper deck at SFO where I awaited the parking shuttle to take me to my car.  It was a lovely evening, quite warm in fact.  I had ample to time to contemplate things since the shuttles don’t real nearly as I would have liked at this hour.

As I stood there watching all the the people coming and going, I had a thought.

“Imagine if I were a taxi driver and I picked up a passenger at the airport.  I take them home and return to the airport for another passenger.  The next person enters my vehicle and gives me their address and oddly enough, it is the next door neighbor  of the previous passenger.”

I mused to myself, “surely this has happened, but how odd it would be.”

The shuttle arrives, I hop on.  2 other people are on board.  We go to the parking structure.  Mind you, this place is big.  6 story parking structure with probably 1000 vehicles and then a sprawl of parking lots lettered A, B, C and so on.

Next stop “C”.  Thats me and this other guy.  We step off the shuttle and head down the same aisle to our cars.  I think to myself, this is odd, he is going to my car.  Not quite, the car next to mine.  Right next to mine.

I couldn’t help but comment to the fellow “Pretty weird, eh?” and reflect on the thought I had only 20 minutes prior of the taxi delivering two people to adjacent homes — adjacent cars in this case.

….. I think my thoughts are trying to tell me something.  I should listen.

Mobile wireless connections

December 18, 2010

Part of my new job requires a support hat.  I need to be able to deal with issues within 15 minutes on many occasions.  Sure, that means toting your laptop but what if you don’t have a wireless internet connection where you are going.  RDP and ssh won’t take you far without net.   Now, I had to dump my iPhone for a blackberry in this job – there was no equivalent to AlertMatrix on droid or iPhone.  I am liking the berry more than I anticipated and it became the basis of my need to tether my phone to my mac.  The carriers are happy to permit it but only if you pay $20 on top of an otherwise unlimited data plan.  Hrm.  That doesn’t make a lot of sense.  After a bit research, I found tether.  I audited the 7 day trial and here is what i just found on Verizon:

80/13 KBit on USB (trial 1)

94/31 KBit on bluetooth (trial 2)

92./33 Kbit on bluetooth (trial 3)

Not too shabby for over the cell phone!!

Jim @ Factory Resole: I bow in your direction…. and here’s why:

My sidi winter boots were ready to be tossed out, deemed unsuitable for another winter.  I was down at my favorite local moto shop in SF and the sidi rep was there.   He told me about Factory Resole.  Here are the results:



Factory Resole comes HIGHLY recommended.  My summer boots will be going in next.

Karma in this life

October 7, 2010

There are many things that happen in life that one can chalk up to coincidence.  Sometimes it can be a stretch.  I like to believe there is a bit more to it – something on another level.  Call it ‘karma’, call it ‘the way things are’, call it what you like.  It is real.

If you’ve followed along you know I am working on finishing up the 67 Camaro.  [ shameless plug, it is for sale! ] I am getting close and it needed to be driven at highway speeds for the first time since reassembly.   I started by making sure full coverage was on it as we I don’t need any mess ups at this point.  I took it out of SF a couple of weekends ago.  The closest safe stretch of highway happens to be the southbound 6th street ramp to 280.  I run her through the gears and she purrs like the over torqued beast she is. 1-2-3-4 and a firm brake hands free to make sure all is straight.  Everything checked out so I exited Ceaser Chavez to avoid an additional 5 miles with no practical turnaround.

Smart.  Haven’t got of here in a long time.

I proceed to head north on 23rd up the backside of potrero hill.  Kind of a no mans land.  The riff raff loitering on the corner was hoping from something exciting from me as I pull up to the stop sign.

Oh no – what’s this?  I appear to be screwed.  It is stuck in 3rd gear!  I lurch through the stop sign.  No burn outs tonight for the hopeful watchers.  I pull up about a block and get out to inspect my situation.  Low battery on the cell, 7:30 PM and getting dark, industrial/transitional neighborhood.  Not looking good.

I maintain my cool and crawl under the car hoping to find something wrong (read missing) with the shift linkage.  No dice, actually it was all there.  Everything appeared fine except for the new scorching burns I earned on my left wrist from the exhaust.

I place call to mom to make arrangements for a flat bed tow.  Along with “low cell, you deal, give them my number, thanks, bye!”

Mind you this is her car, not the type of minimal explanation she was hoping for in that situation.

I decide to crawl back under the car and futz around with things in hopes that I can sort it out when all the sudden I hear “Whoa!” as the voice in a passing car comes to a halt.

I crawl out and look up.  To my surprise *ANOTHER* 1967 Camaro has stopped.  Huh?  Really?  I am floored.  I haven’t seen one driving around in SF in the 10 years I’ve lived here.  These are collectors items.  They are 43 years old.    Most aren’t driven daily let alone where I was on a Sunday night.  Why now?

The driver is Joel.  He’s had his for the last 24 years and knows every quirk about the 67 Camaro.  I explain to him the problem and that a tow is on the way.  He reckoned that wouldn’t be necessary.  He crawls under the car and adjusts the same linkages I was working with but he does it correctly.  “Left-Right-Neutral, Left-Right-Neutral” he explains.

“Check it” he shouts.  “Should be in neutral!”

Sure enough it was.  I thanked him profusely and told him that this was karma.

He was heading the same way so I started off and he followed me until our paths departed with a friendly wave.  I made it home uneventfully and am still blown away by what happened.

Thank you Joel.  Thank you cosmos.  Until our paths cross again.

VDI 3.2 and guest install

September 28, 2010

Any one  who has worked closely with me in recent years knows I am a huge fan of thin clients and desktop virtualization.  Given my current employer, that means using Sun Ray and VDI.  The technology is just so compelling.  In some regards, it can be a bit to get your head around — like the drunk messaging of “cloud” computing from 5 years ago.

For the last 5 years I’ve always worked in a virtual manner, starting with VNC tethered to a data center based system that was my desktop and finally evolving into a SRSS 4.2 delivered OpenSolaris desktop.  Windows has always been a necessity for one reason or another so I used the xvm tools on that OpenSolaris system to enable a WinXP guest as well.  The only problem is that I chase the latest OpenSolaris builds and Sun Ray Server Software ( SRSS ) doesn’t (offically) support OpenSolaris.  Time to go the supported route.  This means:

  • x4170 base system (fully loaded)
  • s10 u8 host OS install.
  • Single system VDI 3.2 install.
  • OpenSolaris pool for a dedicated desktop (of ever increasing image updates to my liking).
  • WinXP pool to run a standard image
  • Additional OS pools to play around with.

What follows is an outline of how I used the Oracle VDI offering to deliver an OpenSolaris and WinXP desktop to myself from a server located in a data center 30 miles away.  In fact this entire article is authored from the OpenSolaris guest!  To get startedI deferred to our Operations team to jumpstart the system (which introduced some config challenges that I perceive as valid in the wild) and the config was as follows:

  1. Starting with base install of s10u8 on a Sun x4170.  z0 ROOT mirror.  6 unused disks.
  2. Fix my primary user “renko” so it is its own zfs filesystem.  Make sure /export/home/renko is empty first.
  3. approot@nohup # zfs create z0/home/renko
    approot@nohup # zfs set mountpoint=/export/home/renko z0/home/renko
    approot@nohup # zfs mount z0/home/renko
    approot@nohup # df -k /export/home/renko
    Filesystem kbytes used avail capacity Mounted on
    z0/home/renko 140378112 21 132851431 1% /export/home/renko

  4. create a zpool of the last 6 disks for /app with one hot spare and create the app volume for bits.
  5. approot@nohup # zpool create tank c0t2d0 c0t3d0 c0t4d0 c0t5d0 c0t6d0 spare c0t7d0
    approot@nohup # zfs create tank/app
    approot@nohup # zfs set mountpoint=/app tank/app

  6. Prepare storage NOTE: my pool will just be “tank”, apps, swap and the VMs managed by vbox will just live here.
  7. make a swap space 2x your memory
  8. approot@nohup # zfs create -V 144gb tank/swap
    approot@nohup # swap -a /dev/zvol/dsk/tank/swap
    # edit /etc/vfstab to make it perm after reboot
    /dev/zvol/dsk/tank/swap - - swap - no -
    approot@nohup # swap -l
    swapfile dev swaplo blocks free
    /dev/zvol/dsk/z0/swap 181,1 8 4194296 4194296
    /dev/zvol/dsk/tank/swap 181,3 8 301989880 301989880

  9. download the VDI/Vbox bundle from http://edelivery.oracle.com
  10. Add apache2 packages (I am just using the jumpstart servers files, find on your media if you installed OS from disk
  11. approot@nohup # cd /net/lab-bld/jumpstart/OS/Solaris_10_2009-U8x/Solaris_10/Product
    approot@nohup # pkgadd -d . SUNWapch2r
    approot@nohup # pkgadd -d . SUNWapch2u
    approot@nohup # pkgadd -d . SUNWiscsitgtr
    approot@nohup # pkgadd -d . SUNWiscsitgtu
    approot@nohup # pkgadd -d . SUNWdhcsb
    approot@nohup # pkgadd -d . SUNWdhcsu
    approot@nohup # pkgadd -d . SUNWdhcsr

  12. continue with storage install directions.
  13. proceed to single box VDI core install directions.
  14. Part of the above requires that you install mysql. SMF definitions are preferred but not discussed here. I made my own and imported it for mysql. Save the text contents of this file as foo.cfg somewhere, then:
  15. approot@nohup # svccfg import foo.cfg
    approot@nohup # svcadm enable mysql

  16. Following the config, you should run vda-install, reboot and run vda-config.
  17. Upon completion of running vda-config, you may have trouble logging into the VDI console at https://hostname:1801 as the root user. Typically the problem stems from the root user being a role in /etc/user_attr. If this is the case you will see the following in /var/opt/SUNWvda/log/webadmin0.log
  18. java.lang.SecurityException: authentication failure: unable to validate Subject :Non-zero exit status
    at com.sun.cacao.agent.auth.SystemMechanism$1.run(SystemMechanism.java:133)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:337)
    at com.sun.cacao.agent.auth.SystemMechanism.parse(SystemMechanism.java:126)
    at com.sun.cacao.agent.auth.CacaoCallbackHandler.handle(CacaoCallbackHandler.java:118)
    at com.sun.jdmk.security.sasl.plain.PlainServer.verifyAuthenticationCredentials(PlainServer.java:186)

    To remedy, simply change root from “type=role” to “type=normal” in /etc/user_attr. You will need to leave it configured as such to keep things like vbox happy as well.  I had this problem due to the hardening that our system operations folks do.  An install off the vanilla Solaris media will not have this issue.

  19. move root vbox bits the zpool tank made earlier so we have a little better IO on our single host
  20. # run /opt/VirtualBox/VirtualBox (as root), then exit.
    # this build the foo you need to move in your home dir.
    mv /root/.VirtualBox /app
    ln -s /app/.VirtualBox /root

  21. For my install, I had to enable graphical logins, otherwise Sun Ray would have nothing to present and would hang at 26B
  22. nohup # svcs -a | grep graphical
    disabled 18:05:54 svc:/application/graphical-login/cde-login:default
    nohup # svcadm enable svc:/application/graphical-login/cde-login:default
    nohup # svcs -a | grep graphical
    online 19:35:55 svc:/application/graphical-login/cde-login:default

  23. Configure VDI
    1. Login as root @ https://host:1801
    2. Settings > VDI Center > Administrator  > New (add something not root)
    3. Logout and Login in as user above.
    4. Settings > Company > New > Oracle
    5. Anonymous LDAP: ldap.company.com, 389, dc=company,dc=com
    6. Change LDAP search filter so we can actually find users in corporate LDAP
    7. nohup # /opt/SUNWvda/sbin/vda settings-getprops -p ldap.user.search.filter
      ldap.user.search.filter: (|(cn=$SEARCH_STRING)(uid=$SEARCH_STRING)(userPrincipalName=$SEARCH_STRING)(mail=$SEARCH_STRING))
      nohup # /opt/SUNWvda/sbin/vda settings-setprops -p ldap.user.search.filter='"(|(mail=$SEARCH_STRING))"'
      Settings updated.
      nohup # /opt/SUNWvda/sbin/vda settings-getprops -p ldap.user.search.filter
      ldap.user.search.filter: (|(mail=$SEARCH_STRING))

    8. The above can also be done in the UI be editing the LDAP configuration under the new company you just created.
    9. Desktop Providers > New > Add VDI host > Add Storage
    10. Pool > New > Manual > “OpenSolaris” (for my dedicated desktop)
  24. Import first image to be used as my primary desktop
    1. In VBOX, create a new VM using OpenSolaris.  I used 134b2
    2. Attach the ISO image, start the VM and configure it.
    3. Add Guest Additions to the image an shutdown.
    4. Import your image. I had trouble with 50G image and timeouts, so I do it all on the CLI
    5. nohup # ln -s /app/.VirtualBox/HardDisks/sighup.vdi /var/tmp
      nohup # ln -s /app/.VirtualBox/Machines/sighup/sighup.xml /var/tmp
      nohup # /opt/SUNWvda/sbin/vda pool-vb-import -p vdi-image=sighup.vdi,xml-configuration=sighup.xml OpenSolaris
      Importing desktop ...
      This action may take several minutes to complete. It will be executed as a
      background job. Use the job-list command to monitor progress.
      The job id is 5.
      nohup # /opt/SUNWvda/sbin/vda job-list
      Importing Desktop OpenSolaris Running 5 C
      'C' denotes jobs that can be canceled
      nohup # /opt/SUNWvda/sbin/vda job-wait 5

    6. Users > Company, search for user@company.com.
    7. Click on user@company.com > assignments > assign to imported desktop.
    8. Token > Add (add my javabadge ID which I fetched from the SRSS admin console on 1661)
    9. Login to my desktop, and pkg-image update to the latest OpenSolaris build.
    10. it worked.  woot!
  25. Import winxp image.  All i have available for this one is a VMDK dataset from my companys corporate IT.
    1. First create a new pool “WinXP OBI”
    2. I made this one flexible to grow with personal desktops.
    3. Assign user accounts that should have access to the pool and not the image directly.  upon login, VDI will do that
    4. Now prepare the VMDK image.  This requires a conversion from VMDK to VDI.
    5. nohup # /opt/VirtualBox/VBoxManage clonehd Legacy_XPOBI_Lite.vmdk Legacy_XPOBI_Lite.vdi --format VDI
      Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
      (C) 2005-2010 Oracle Corporation
      All rights reserved.
      Clone hard disk created in format 'VDI'. UUID: b566a309-ddc5-4fac-9271-8b6a8d675588

    6. Add the above disk image in the VirtualBox Virtual Device Manager
    7. Create a new virtual machine (winxp 64-bit) using this hard disk.
    8. Start the image and install the guest additions.  Do not answer any of the “first run” questions that the image wants to ask.
    9. Shutdown the image
    10. In VDI, create a new pool called “winxp”.  I defined it as a growing pool, filled with personal desktops based on the image we are about to import.
    11. From the CLI on the VDI host, import the image:
    12. nohup # /opt/SUNWvda/sbin/vda pool-vb-import -p vdi-image=Legacy_XPOBI_Lite.vdi,xml-configuration=Legacy_XPOBI_Lite.xml winxp-obi
      Importing desktop
      This action may take several minutes to complete. It will be executed as a
      background job. Use the job-list command to monitor progress.
      The job id is

    13. Mark the image as a template and update the cloning parameters so the pool will begin to populate.
    14. Q.E.D.

Obviously, many of the steps are specific to my environment or images provided by the corporate IT group.  The intent was to document the primary steps to configuring a VDI single host env that one or more people can use.   Comments are always welcome.  Have fun!

The work outlined in the previous post was successful.  I did have to use a dremel to clean up some of the JB weld on the shaft to minimize any potential gear conflict in side the motor.   Here is a video short of the motor in action.  Closure of the louver requires the ignition to be turned on.  That resulted in the delay seen after the headlight goes out the first time.  The second time I had the ignition on.  sweet! Here it is in action.