Category Archives: Computer

IPv6 on Time Warner with VLANs using OpenWrt

I’ve retired the old Linksys e3000 running TomatoUSB and have replaced it with a ZyXEL NBG6716 802.11AC router that is running OpenWrt Chaos Calmer.  One of the things I was never able to get to work on the e3000 with Tomato-USB was getting each of the four VLANs an IPv6 subnet.  I could only seem to pull down a /64 from Time Warner, which would then get assigned automatically to my first VLAN.  The good news is, I am now running with a /56 assignment from Time Warner with each VLAN assigned a /64.

My current setup looks like:

  • ZyXEL NBG6716 AC router
  • OpenWrt Chaos Calmer r43762 (snapshot of trunk at the time)

So, to start out, make sure you have the following software packages installed:

  • ip6tables
  • ip6tables-extra
  • kmod-8021q
  • kmod-ip6tables
  • kmod-ipv6
  • odhcp6c
  • (optional) luci-proto-ipv6

Setup WAN

At this point, I configured the WAN interfaces to pull an IPv6 address (Network -> Interfaces).  Edit the WAN6 interface to update the following settings:

  • General Setup Tab
    • Protocol: DHCPv6 client
    • Request IPv6-address: try
    • Request IPv6-prefix of length: 56
  • Advanced Settings Tab
    • Bring up on boot: checked
    • Use builtin IPv6-management: checked
    • Use default gateway: checked
    • Use DNS servers advertised by peer: check (even though TW hasn’t passed IPv6 DNS servers to me yet)
  • Physical Settings Tab
    • Bridge interfaces: unchecked
      • Interface: “Ethernet Adapter: “eth1″
  • Firewall Settings
    • Create / Assign firewall-zone: wan

Create VLANs

Now create the VLANs that you want to use (Network -> Switch).  Make sure that each of the VLANs you create are tagged for the CPU.  In my setup, I have the VLANS: Management, Home, Guest, DMZ.

Create Interfaces for the VLANs

Read more »

Burnt VPN Pi (VPN Hotspot on Raspberry Pi)

Warning: I found this in my drafts and I think it was mostly done.  Enough where I can follow it again.  You might have issues following it word for word though until I can recheck and remove this warning.


The purpose of this project is to create an environment where we can use two Raspberry Pi’s to create a temporary VPN tunnel, where the client Pi also has an AP hotspot that routes all traffic through the VPN tunnel.  This is good for those people who are going to countries that have different policies than your current country.  Some of the uses I’ve used it for:

  • Watching Netflix while in another country so that I can view my home countries content
  • Getting around country firewalls that block applications such as Facebook, twitter, Instagram, etc
  • Connecting back to a trusted network when I am in a spot where the network is known to be monitored and trying to steal data.

Install the Required Software

Install the following packages:

apt-get update
apt-get upgrade
apt-get install openvpn hostapd resolvconf dnsmasq cryptsetup libnet-ifconfig-wrapper-perl cryptsetup

Now disable some of the software from starting up, as we will be having these pieces start up triggered by future events such as eth0 up and openvpn up:

update-rc.d openvpn disable
update-rc.d hostapd disable
update-rc.d dnsmasq disable

Load modules

Read more »

Using MAAS on OpenCompute – Setting up PXE for Serial Console

This article is using Ubuntu 13.10 (Saucy) as a base install.  One of the issues with using OpenCompute nodes is the fact that it is headless.  One of the issues that generally comes up with all tools, being it Cobler, Mirantis, or MAAS, is that the pxe config is not setup to actually show the serial information.  While playing with Ubuntu MAAS, I did figure out a way to redirect the console to serial to be viewed of SOL.

The first step is to install MAAS following the directions that are posted.  In this case I actually installed MAAS on a non-OpenCompute platform, in this case a laptop that I generally use as the controller.  The reasoning is that I don’t want to waste a power OpenCompute  node on what can easily be ran on a basic computer.

We are going to need to modify the templates that are located at /etc/maas/templates/pxe so that we can setup the bootloader and the kernel params so everything gets redirected to console.  If this is not setup, the lat thing you should see before funky characters would be:

Loading amd64/generic/saucy/xinstall/linux........
Loading amd64/generic/saucy/xinstall/initrd.gz.......................

We first will need to setup the boot loader on each image to redirect to the console.  This can be done by:

# cd /etc/maas/templates/pxe/
# sed -i '1iSERIAL 0 115200n8' config.commissioning.template
# sed -i '1iSERIAL 0 115200n8' config.install.template
# sed -i '1iSERIAL 0 115200n8' config.local.amd64.template
# sed -i '1iSERIAL 0 115200n8' config.local.i386.template
# sed -i '1iSERIAL 0 115200n8' config.local.template
# sed -i '1iSERIAL 0 115200n8' config.xinstall.template

The second piece we have to fix then is having the kernel direct to console also.  This is good for when MAAS does the automated install. This step is easier and what you need to do is go to the MAAS webpage, click on the gear on the top left, and scroll down to the “Global Kernel Parameters” section. Add “console=tty0 console=ttyS4,115200n8″ in the text box and click the “Save” button.

Controlling a RGB LED attached to a Raspberry Pi through Android

This was a bit of a project that I used to learn some new technology.  Note: I am not an EE and I am just learning how to do this.  Proceed with caution if you want to repeat.

Project Description

I need to be able to control turning on and off an RGB LED utilizing the Raspberry Pi.  I also should be able to turn it on and off using an Android device.


The design is made up to utilize three different components: Raspberry Pi / LED Hardware, Web Service, and Android device.

Raspberry Pi

All the gear that was used was:

  • Raspberry Pi – Model B
  • 5mm High Brightness Full-Color LED
  • Breadboard
  • Resistors
  • 3 x Transistors – 2N3904

Some of the constraints I also have to work with are:

  • Each of the 3.3V GPIO pins can handle a maximum current of 16mA.  They might be able to do more, but from what I read, it would not be for long.
  • The Pi takes about 700mA of the total power without anything plugged in (USB, HDMI, etc), so depending on the power adapter used, there might not be enough power.  In this case, I used a 2A plug.
  • Since each color will require more than 16mA of power to turn on, I need to utilize transistors and the 5V pin from the Pi.  I will use the GPIO to handle closing the circuit on an NPN transistor.  I believe I need to use NPN due to the fact that the LED has a common anode.

Read more »

OpenCompute IPMI with F11 / F12 Issues

These are more notes than a real blog post.  Working with IPMI on OpenCompute has weird quirks and one of those is the Serial BIOS with the F11 and F12 keys.

Here’s an example of using ipmitool to pull information remotely about the power status

$ ipmitool -C3 -I lanplus -H -U admin -P <password> power status

Using the Serial BIOS

The serial BIOS interface is a bit brain damaged in that it does not recognise the “F11″, and “F12″ key escape codes that most terminal programs send, instead you can send “Esc-!”, and “Esc-@” (yes very logical, as long as the ‘@’ key is normally typed using ‘Shift-2′ – as on US keyboards, not miles away from the ‘2’ key, as on many non-US keyboards).  These escapes from HP, and Dell serial BIOS’ may or may not be useful:

Defined As     F1     F2     F3     F4     F5     F6     F7     F8     F9     F10    F11    F12
Keyboard Entry <ESC>1 <ESC>2 <ESC>3 <ESC>4 <ESC>5 <ESC>6 <ESC>7 <ESC>8 <ESC>9 <ESC>0 <ESC>! <ESC>@

Defined As     Home   End    Insert Delete PageUp PageDn
Keyboard Entry <ESC>h <ESC>k <ESC>+ <ESC>- <ESC>? <ESC>/

Use the <ESC><Ctrl><M> key sequence for <Ctrl><M> Use the <ESC><Ctrl><H> key sequence for <Ctrl><H> Use the <ESC><Ctrl><I> key sequence for <Ctrl><I> Use the <ESC><Ctrl><J> key sequence for <Ctrl><J> Use the <ESC><X><X> key sequence for <Alt><x>, where x is any letter key, and X is the upper case of that key

Setting up TomatoUSB for VLANs and Ubiquiti AP

So after getting a quarter of the way through a comment to a question somebody had on my Ubiquiti APs, TomatoUSB, VLANS, and Linksys e3000 post, I realized it would probably work better as a post instead. Christoph’s question was:

How did you wire everything? I’m trying to do the same and had no luck. I only have one UAP, but if I turned on tagging for the Port I used for each bridge, I wouldn’t even get an IP.
I would like Management and Home to be one vlan, and guest another, so my setup is simpler. Maybe knowing how you wired it will help.

I’m going to walk essentially through what steps I remember taking to get up that far.


  • VLAN 2: Home / Management
  • VLAN 3: DMZ
  • UAP plugged into Port 1
  • Admin Computer plugged into Port 4
  • Management / Home network is
  • Guest network is
  • You have a VLAN edition of Toastmans TomatoUSB mode

Setting up TomatoUSB Read more »

RocketRaid 622 Driver (rr62x) for Ubuntu Linux Kernel 3.8

More of a reference for myself so that I don’t have to go through this again, but I put together the patches people had in multiple places so that I can install rr62x-dkms on my 12.04 system. Probably a better way to do this, but I’m tired and just wanted to get the system up.

File: rr62x-dkms_1.1_all-3.8.deb

Resources Used

Sound on Dell XPS L702X in Linux

After getting the sound working on the laptop, I was still running into issues with distorted sound and the sub woofer not working. The sound chipset that is in it is Intel, as can be seen by:

00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)

The fix was by adding some additional commands to the snd-hda-intel module:

echo "options snd-hda-intel model=ref index=0" >> /etc/modprobe.d/sound.conf
echo "options snd-hda-intel model=6stack-full" >> /etc/modprobe.d/sound.conf

Accessing your eBook collection managed by Calibre without Calibre Server

This post is about how I’ve been going about enabling access to my eBook purchases that are managed with Calibre without actually using the built in Calibre Server.  All of this is running on Linux, with my eBooks and Calibre Library sitting on a remote Linux File Share.

The reason that I’m not using the Calibre Server to do the distribution is because:

  1. I actually store all the eBooks and the Calibre database on a Linux file share that is then shared on my network using Samba.
  2. I use multiple computers to interact with that Calibre database (not at the same time).  They are all setup to open the database on the samba share.
  3. The file share is headless and does not have X installed

So to do this, the first thing I had to do was setup the directory on my file share and then setup samba to share it out to the network.  Once that was done, I then mounted the share on my client computer.  With that done, when I started Calibre for the first time, I just change the configuration to use the samba share directory.  Now whenever I open Calibre, all the eBooks and database files are now stored and shared internally on my file share.

Read more »

Ubuntu 10.10 Grub Update for OS X

This article builds upon Triple Booting Windows 7, OS X (Chameleon), and Ubuntu 9.10 (Grub2).

I recently updated my desktop to Ubuntu 10.10 and noticed that the grub commands have changed ever so slightly. With the new installation, I just needed to create the /boot/chameleon/ directory again and copy the boot0 from Chameleon 2.0-RC4 into the directory.

One thing that I noticed is that the new grub script also presents 32-bit and 64-bit options for my OS X installation now, which I’m up to 10.6.3. I take care of loading 64-bit through chameleon though. Here is my new entry for loading OS X through Cameleon.

 menuentry "Mac OS X Chameleon (on /dev/sda2)" {
     insmod hfsplus
     set root='(hd0,msdos2)'
     search --no-floppy --fs-uuid --set 62d3496cb25b59d8
     parttool (hd0,2) boot+
     chainloader (hd0,msdos4)/boot/chameleon/boot0

Sometimes it doesn’t copy correctly, but it should be two hyphens in front of no-floppy, fs-uuid, and set

You can find your uuid of your partitions by running blkid.

My current partition setup is:

  • /dev/sda1: Windows 7
  • /dev/sda2: OS X
  • /dev/sda3: Swap
  • /dev/sda4: Ubuntu Linux 10.10