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!
Category Archives: Ramblings
Getting Set-up with Hosting and WordPress
Getting Set-up with Hosting and WordPress
Workshop at Ottawa Word Camp. May 3rd and 4th, 2014
I will be presenting a workshop on Setting up a WordPress Development Environment.
Easing your GoDaddy pain
GoDaddy customer feeling the pain from the recent DoS attacks? Transfer your domain to Alternative Hosting and get a free month of hosting with coupon code “FREEMONTH“.
Buffalo WZR-HP-G300NH2 Router with DD-WRT and IPv6 from Hurricane Electric
Modified from http://www.dd-wrt.com/wiki/index.php/IPv6_setup_Hurricane_Electric_Tunnel_Broker
Hurricane Electric’s Free Tunnelbroker.net
Registration
1) Sign up for an account with our web based registration at Tunnelbroker.net
2) After creating your account, provide your IPv4 endpoint, and pick the closest tunnel-server to your location:
Asia
- Hong Kong, HK
- Singapore, SG
- Tokyo, JP
Europe
- 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
Features
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.
Tunnelbroker.net is operated and maintained by a business and not individuals, and provided FREE to anyone interested in learning more about IPv6.
Setup
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 reboot
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/updateipv4.sh script:
#!/bin/sh -x #SAMPLE USERID="29812e32f424324324234" USERID="<insert value here>" #SAMPLE PASSWORD="CatsAndDogs" PASSWORD="<insert value here>" #SAMPLE TUNNEL_ID="96782" TUNNEL_ID="<insert value here>" #SAMPLE CLIENT_IPV6_ADDRESS="2001:271:18:2c7::2/64" CLIENT_IPV6_ADDRESS="<insert value here>" #SAMPLE SERVER_IPV4_ADDRESS="218.65.27.48" 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" ] then if [ "$WANIP" != "$WANIP_OLD" ] then 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" ] then CLIENT_IPV6_ADDRESS="" fi ip tunnel del tun6to4 2>>/dev/null ip tunnel del he-ipv6 2>>/dev/null if [ -n "$CLIENT_IPV6_ADDRESS" ] then echo "Configure he-ipv6 tunnel" 1>&2 MD5PASSWORD=`echo -n "$PASSWORD"|md5sum|sed -e 's/ *-//g'` /usr/bin/wget 'http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b='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 else 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 ::192.88.99.1 dev tun6to4 fi echo 1 > /proc/sys/net/ipv6/conf/all/forwarding fi fi
You will likely need to terminal into the router and use vi to create the file. Be sure to run:
chmod ugo+rx /jffs/updateipv4.sh
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/updateipv4.sh 2> /jffs/startup.debug kill -HUP $(cat /var/run/radvd.pid) 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 updateipv4.sh script interactively. Note: The updateipv4.sh 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/updateipv4.sh
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/updateipv4.sh
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.
Wow! That was easy!
After some prodding from the other half, I decided to install Splunk on our monitoring server. As usual when installing new software on a production server I was prepared for the inevitable headaches. After initially being disappointed there was no Yum install for it, I was reading the install guide to find out what extra modules I was going to need to compile to get it installed. To my pleasant surprise, Splunk required a single file download and a one line install command. After launching the service and accepting the terms and setting the service to launch on boot (and of course opening up the ports on my firewall) I found the install was complete.
Configuring Splunk was just as easy. I simply had to tell it which directory my logs are stored in. Setting up a forwarder on my other servers was just as easy. I found the method that worked was do a full install, configure the directories and forwarding then set it to lightweight forwarding mode. Next thing i knew all my log files were being sent to the monitoring server (and exceeding the daily 500MB limit … you would think that it would skip the limit during initial configuration).
Networking with CentOS 6 and Microsoft Hyper-V
In order to get networking working properly with CentOS 6 on Hyper-V, use the following steps.
On the host, download Linux Integration Services Version v3.2 for Hyper-V
To install Linux Integration Services Version 3.2:
- Open Hyper-V Manager: Click Start, point to Administrative Tools, and then click Hyper-V Manager.
- Create a new virtual machine where you will install Linux: In the Actions menu, click New, and then click Virtual Machine.
- Specify the Linux installation media: Right-click the virtual machine that you created, and then click Settings. In IDE Controller, specify one of the following:
- An image file in ISO format that contains the files required for installation
- A physical CD/DVD drive that contains the installation media
- Right-click the virtual machine that you created, and then click Settings. Select Legacy Network Adapter and click Add.
- Configure the new Legacy Network Adapter with a static MAC address. Click OK.
- Turn on the virtual machine: Right-click the virtual machine that you created, and then click Connect.
- Begin installing Linux.
- When prompted, restart the virtual machine and complete any first-boot configuration tasks.
Note
Unless a legacy network adapter was added during the virtual machine’s initial configuration, the virtual machine will not have any network support.
- Log on to the virtual machine.
- In Hyper-V Manager, configure LinuxIC v32.ISO (located in the directory where you extracted the downloaded files) as a physical CD/DVD drive on the virtual machine.
- As the root user, mount the CD in the virtual machine by issuing the following command at a shell prompt:
# mount /dev/cdrom /media
- As the root user, run the following command to install the synthetic drivers. A reboot is required after installation.
# cd /media
# /media/install.sh
# reboot
- Shutdown your virtual machine.
- Right-click your virtual machine and then click Settings. Select the Network Adapter.
- Make sure the Network that is selected is your External Network.
- Change the MAC Address to match the one on your Legacy Network Adapter.
- Select the Legacy Network Adapter and click Remove.
- Turn on the virtual machine: Right-click the virtual machine and then click Connect.
- Log on to the virtual machine.
- Change the network config scripts for eth0.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
NM_CONTROLLED=”no”
ONBOOT=”yes”
BOOTPROTO=”dhcp”
- Enable the eth0 interface.
# ifup eth0
- Verify your settings by pinging Google.
# ping 8.8.8.8
The above instructions are based on the ones provided with the Linux Integration Services Version 3.2, but with updates and changes I have found were needed in order to get networking functioning.
New Beginnings
How appropriate that I start this blog on a day of new beginnings. This morning I was called in for a “scheduling meeting” which was in reality a corporate downsizing lay-off. So as of today I am back on the job hunt but also looking forward to working on some of my own projects as well.
[GAN_Text maxads=4 orientation=’horizontal’ ifwidth=550 ifheight=80]
I hope to be attending the IPv6 Summit in Ottawa on Friday. Even if I don’t manage to make any new contacts (highly unlikely) I am still looking forward to the experience to learn from others who are also working on IPv6 deployments right now. My home office deployment in 95% complete, I just need to work on some problems with radvd not properly advertising DNS servers (or more appropriately, Windows 7 not recognising the router advertisements for DNS servers). The nightly release of OpenWRT is a huge help n deploying IPv6 as it includes the ip6tables config which is missing from the latest official release. As for the D-Link firmware for my router, like the Cisco small business (Linksys) IPv6 certified one I tried, it works great for local IPv6, but routing across my PPPoE connection has a lot of issues.
As for other projects, I have a few to keep me busy. My migration to new dual stack servers is completed. This site is nearly complete. I have several DragonHawk sites I need to work on (Enterprises, Productions, Entertainment and Lore). BusinessITSolution.com will become a full service SaaS and network management service. MonkeyPhux is a new open source dating server application I plan to start work on. Geek2GeekDating will be my production site using the MonkeyPhux back end. CreditFuckers is going to become an IP telephony debt collector blacklist database. ActiveSpeak will become a hosted VOIP PBX service. Finally MusicScribes will be a music fiction writers site.