IPv6 on the WRT54G via OpenWRT

From JoatWiki
Jump to: navigation, search

It took a little bit of fiddling to get this up and running but I finally did it.

While the actual setup/configuration takes less than an hour if you know what you're doing, it make take a couple weekends to get up and running if you never done this sort of thing. You also run the risk of turning your WRT54G into a brick.

For now, installation of OpenWRT on the WRT54G is beyond the scope of this document. If anyone insists, I'll come back and add that process to this page. For now, please Google for the process or visit http://openwrt.org.

I highly recommed installing the tcpdump package on the WRT54G. It helps to "see" what the various interfaces are passing and if anything is getting returned from your tunnel broker.

Once you have OpenWRT installed and have added in the IPv6 packages added in, you'll need to find a tunnel broker. I use Hurricane Electric's free service at http://www.tunnelbroker.net. Look for the "Register" button on the bottom of the page.

ipv6-pic1.png

It'll take a couple hours for the service to respond but you'll receive an e-mail from them containing a temporary password. Use it to log onto the site. You should see something similar to

ipv6-pic2.png

Ignore the Tunnel Overview section for now (that's what it will look like when you're done configuring it). Click on "Update Info" and change your password. Next, click on "IPv4 End", type in your router's external IP address into the "IPv4 endpoint" field, and click on "Submit".

ipv6-pic3.png

Next, click on "/64 Allocation" and then click on the "Submit" button. It's okay to leave the three DNS fields blank. These are only useful if you're standing up your own DNS servers and plan on offering up some sort of server to the IPv6 backbone. The page should now look like:

ipv6-pic4.png

Finally, click on "Tunnel Details" and write down the data available. It should look something like below. You'll also see a MRTG graph at the bottom of the page (which may be useful once you have the tunnel up and running).

ipv6-pic5.png

Also please note the "Example Configs" option in the left-hand menu. This too may be useful to some. That's it for the broker end.

Following are excerpts from my config files. Be sure to edit them before you use them in your router. Be sure to read the docs available at http://openwrt.org to learn what you need to do to edit the files. In their out-of-the-box state, they are read-only! In /etc/init.d/S99done, I added:

  insmod ipv6
  insmod ip6_tables
  insmod ip6table_filter
  echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
  sleep 60
  killall telnetd
Those last two lines kills the telnet daemon after 60 seconds. (Minimizes a vulnerability!) I added the following to /etc/init.d/rcS:

  ip tunnel add he.net mode sit remote 64.71.128.82 local MY.IP.ADDR.HERE ttl 255
  ip link set he.net up
  ip addr add 2001:470:1F00:FFFF::657/127 dev he.net
  ip route add ::/0 dev he.net
  ip -f inet6 addr
  ip -6 addr add 2001:470:1F00:911::1/64 dev eth1
  radvd

Note: the 3rd line contains the Client IPv6 Address assigned by the tunnel broker.

Note: The sixth line contains the "Assigned /64" assigned by the tunnel broker.

Finally, I configured the routing advertisement daemon (radvd) which allows me to not have to assign an IPv6 address to my laptop when I fire up wireless:

  interface eth1
  {
          AdvSendAdvert on;

  #
  # These settings cause advertisements to be sent every 3-10 seconds.  This
  # range is good for 6to4 with a dynamic IPv4 address, but can be greatly
  # increased when not using 6to4 prefixes.
  #

          MinRtrAdvInterval 3;
          MaxRtrAdvInterval 10;

  #
  # Disable Mobile IPv6 support
  #
          AdvHomeAgentFlag off;

  #
  # example of a standard prefix
  #
          prefix 2001:470:1F00:911::/64
          {
                  AdvOnLink on;
                  AdvAutonomous on;
                  AdvRouterAddr on;
          };
  };

"eth1" is the interface of my wireless. For my setup, I split the wireless from the wired part of the LAN. For most, substitute "br0" for "eth1" in the config above. Also, please note the prefix line which uses the "Assigned /64" data from the tunnel broker.




Comments:

Leave a Comment

Personal tools