Review of the CloudMGR WHMCS plugin

Recently I have been testing out a new WHMCS plugin called CloudMGR. CloudMGR allows you to provision Amazon EC2 servers from within WHMCS. This has opened up the cloud services vertical to our web hosting offerings.

CloudMGR has a straight forward interface for adding cloud servers to your product list. Their offering includes popular servers like WordPress appliances, Amazon Linux, Ubuntu and even Windows servers. A simple wizard driven interface allows you to pre-define the instance size, storage and even the data-center to deploy the image in. There is even an interface for importing your own custom images into the system. Once you complete the wizard, you have the opportunity to go directly to the product setup to customize all the other options, such as welcome emails and additional pricing terms.

The plugin integrates quite well with WHMCS, including the provisioning of servers, through to the termination of service (the catch there, rightly so, is that terminating a product does indeed delete the server and all data in the cloud). The other unusual feature of the plugin is that provisioning does take up to a minute to complete. This is due to the way Amazon issues IP addresses. The plugin must wait until the server has started up to acquire the IP address from Amazon. Because this is needed for the welcome email, this does introduce a long period where the order screen is just sitting and processing, with no indication it is actually doing anything. Because of this, you may want to set provisioning to happen manually, rather than after payment has been received, as there is no way to indicate to the customer that you are waiting on the server to be built.

The support I have received has been outstanding, usually responding back with a fix for any bugs I did find within 24 hours. The only drawback to their support has been that they are Australia based, so responses come in after hours – by the time you can respond in the morning, their offices are closed for the night. This will shortly be rectified as they are opening a US based sales and support office.

CloudMGR is looking to add even more features to their plugin over the next few months, including the provisioning of S3 cloud storage and Amazon backed DNS (Route53) and domain registration. Although these last two are not of benefit to myself, as I already have the DNS and domain registration infrastructure in place, I can see them being of huge benefit to someone starting up a new hosting company, or looking to bring web hosting management in-house. I am eagerly looking forward to their cloud storage solution, especially if it can be integrated with a backup solution.

WordCamp Ottawa 2014

If you are at WordCamp Ottawa today, look for me. I’ll be running between MacKenzie 3275 and 3380 taking photos, as well as parking at the Happiness Bar when I’m not taking photos!

Buffalo WZR-HP-G300NH2 Router with DD-WRT and IPv6 from Hurricane Electric

Modified from

Hurricane Electric’s Free


1) Sign up for an account with our web based registration at

2) After creating your account, provide your IPv4 endpoint, and pick the closest tunnel-server to your location:


  • Hong Kong, HK
  • Singapore, SG
  • Tokyo, JP


  • Amsterdam, NL
  • Paris, FR
  • Stockholm, SE
  • Zurich, CH

North America

  • Ashburn, VA, US
  • Chicago, IL, US
  • Dallas, TX, US
  • Fremont, CA, US
  • Los Angeles, CA, US
  • Miami, FL, US
  • New York, NY, US
  • Seattle, WA, US
  • Toronto, ON, CA


By default you already get a /64 allocation routed to your side of the tunnel.

If you need more than a single /64, with the click of a button you can allocate a single /48 routed to your side of the tunnel.

A large variety of configuration examples are provided for various platforms covering: Linux, *BSD, Windows as well as router platforms. is operated and maintained by a business and not individuals, and provided FREE to anyone interested in learning more about IPv6.


My fist step was to get jffs2 working on my Buffalo router. After many attempts through the user interface, I found the following commands from a terminal session worked to enable read/write access to jffs2.

nvram set jffs_mounted=1
nvram set enable_jffs2=1
nvram set sys_enable_jffs2=1
nvram set clean_jffs2=1
nvram set sys_clean_jffs2=1
nvram commit

Now that we have read/write access to the jffs2 file system, since we need a way to recycle the tunnel when the router’s IPV4 address change, it makes sense to put the main logic in a separate script. The following is the /jffs/ script:

#!/bin/sh -x
#SAMPLE USERID="29812e32f424324324234"
USERID="<insert value here>"
PASSWORD="<insert value here>"
TUNNEL_ID="<insert value here>"
#SAMPLE CLIENT_IPV6_ADDRESS="2001:271:18:2c7::2/64"
CLIENT_IPV6_ADDRESS="<insert value here>"
SERVER_IPV4_ADDRESS="<insert value here>"
echo >> /tmp/wanip
WANIP_OLD=`cat /tmp/wanip`
WANIP=`ifconfig vlan2 | grep 'inet addr:' | awk '{print $2}' | cut -d/ -f1 | awk -F"addr:" '{print $2}'`
if [ -n "$WANIP" ]
 if [ "$WANIP" != "$WANIP_OLD" ]
 echo "External IP: $WANIP" 1>&2
 ROUTED_ADDRESS=`sed -n -e 's,^ *prefix *\([^ ]*\) *{,\1,p' /tmp/radvd.conf`
 if [ "$ROUTED_ADDRESS" = "0:0:0:1::/64" ]
 ip tunnel del tun6to4 2>>/dev/null
 ip tunnel del he-ipv6 2>>/dev/null
 if [ -n "$CLIENT_IPV6_ADDRESS" ]
 echo "Configure he-ipv6 tunnel" 1>&2
 MD5PASSWORD=`echo -n "$PASSWORD"|md5sum|sed -e 's/ *-//g'`
 /usr/bin/wget ''AUTO'&pass='$MD5PASSWORD'&user_id='$USERID'&tunnel_id='$TUNNEL_ID' -O - exit'
 ip tunnel add he-ipv6 mode sit ttl 255 remote $SERVER_IPV4_ADDRESS local $WANIP
 ip link set he-ipv6 up
 ip addr add $CLIENT_IPV6_ADDRESS dev he-ipv6
 ip route add ::/0 dev he-ipv6

 BR0_MAC=`ifconfig br0 |sed -n -e 's,.*HWaddr \(..\):\(..\):\(..\):\(..\):\(..\):\(..\).*,\1\2:\3\4:\5\6,p'`
 # These commands aren't on HE's website, but they're necessary for the tunnel to work
 ip -6 addr add $(echo "$ROUTED_ADDRESS"|sed "s,::/..,::$BR0_MAC/64,") dev br0
 ip -6 route add 2000::/3 dev he-ipv6
 echo "Configure tun6to4 tunnel" 1>&2
 V6PREFIX=`printf '2002:%02x%02x:%02x%02x' $(echo $WANIP | tr . ' ')`
 ip tunnel add tun6to4 mode sit ttl 255 remote any local $WANIP 
 ip link set tun6to4 mtu 1480 
 ip link set tun6to4 up 
 ip -6 addr add $V6PREFIX:0::1/16 dev tun6to4 
 ip -6 addr add $V6PREFIX:1::1/64 dev br0 
 ip -6 route add 2000::/3 via :: dev tun6to4 
 echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

You will likely need to terminal into the router and use vi to create the file. Be sure to run:

chmod ugo+rx /jffs/

Next the startup script. Set this in your startup under Administration->Commands->Startup:

#Enable IPV6
insmod /lib/modules/`uname -r`/kernel/net/ipv6/sit.ko
sleep 5
radvd -C /tmp/radvd.conf start
sleep 5
rm -f /tmp/wanip
/jffs/ 2> /jffs/startup.debug
kill -HUP $(cat /var/run/
sleep 10
echo "starting radvd" >> /jffs/startup.debug
radvd -C /tmp/radvd.conf start &

Note: The sleep commands are just to give time for the IPV4 network to come-up, and for the updates from the script to finish.

Finally, Radv5 config. Set this under Administration->Management->IPV6 Support->Radvd config:

interface br0 {
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvLinkMTU 1480;
AdvSendAdvert on;
prefix <insert value here> {
AdvOnLink on;
AdvAutonomous on;
AdvValidLifetime 86400;
AdvPreferredLifetime 86400;
# Base6to4Interface vlan2;

The prefix value should be your Route 64 address. e.g. 2001:270:1c:1d8::/64

If instead you wish to use an IPV6 to IPV4 bridge instead use an address of 0:0:0:1::/64 and uncomment the Base6to4Interface line like the following:

interface br0 {
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
AdvLinkMTU 1480;
AdvSendAdvert on;
prefix 0:0:0:1::/64 {
AdvOnLink on;
AdvAutonomous on;
AdvValidLifetime 86400;
AdvPreferredLifetime 86400;
Base6to4Interface vlan2;

Walla. Once everything is saved you are ready to reboot your router. If things don’t work try running the script interactively. Note: The script has been designed so it can be rerun regularly to pickup a new wan ip address. So if the wanip is the same as the last time it ran, it does nothing. I would recommend putting in a cron job in Administration -> Management -> Additional Cron Jobs to run the script regularily.

* 4 * * * root /jffs/

If you want to force it to run from the terminal session anyway (for debugging purposes), then simply remove the /tmp/wanip file first. e.g.

$ rm /tmp/wanip;/jffs/


Announcing Web Hosting from AlternativeHosting!

Announcing Web Hosting from AlternativeHosting! Today I helped launch a new web hosting service: AlternativeHosting.

We offer a wide range of hosting solutions, domain registration and SSL certificates. We also offer Dual Stack IPv4 + IPv6 hosting options. We host your site so everyone can visit it! Our servers are monitored 24×7 for a wide range of issues on both the IPv4 and IPv6 interfaces. We also monitor our network latency to ensure you get the fastest experience and routing over IPv4 and IPv6.