Here I will show several methods to configure IPv6 tunnel on Ubuntu machine.
Miredo
The first and the easiest one is to use miredo tool that uses teredo tunneling protocol (RFC 4380).This method works for NATed machines and doesn't require configuration of routers.
Go to System->Administration->Synaptic Packet Manager, search for miredo and install the product. After installation, service should be started automatically. You can use service commands to start/stop it:
service miredo start
service miredo stop
New interface called teredo was created.
teredo Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: fe80::ffff:ffff:ffff/64 Scope:Link
inet6 addr: 2001:0:53aa:64c:8e1:636f:b04b:f84d/32 Scope:Global
UP POINTOPOINT RUNNING NOARP MTU:1280 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:96 (96.0 B)
To check that it works:
ping6 ::1 - ping loopback device
ping6 -I teredo fe80::ffff:ffff:ffff - IPv6 address starting with fe80, it's and address of local link, usually derived from MAC
ping6 2001:0:53aa:64c:8e1:636f:b04b:f84d
ping6 ipv6.google.com
ip -6 route - check routing table
Withdraws : teredo allows to have only /128 connection, means to subnet can be created on client side, but single peers only.
Hurricane Electric
Hurricane Electric is an IPv6 broker, offerring IPv6 subnets and IPv6 BGP service as well. First of all it needs to registrate and create account on their site.
I have Sofaware / Check Point router that connects to the internet via ADSL, means there is automatic NAT on all outbound connections. When creating the tunnel on HE site, you need to provide the dynamic IP that router receives as IPv4 client endpoint. Current router's IPV4 address can be checked by services like myIP. IPv4 server endpoint address and IPv6 addresses will be provided automatically when tunnel is created.
To configure tunnel interface, script provided on HE page can be used. The address of IPv4 end point should be local address of the machine and not the router. I use this script to confgire he-ipv6 interface.
#!/bin/bash
# Server's IPv4 IP
ipv4s=216.66.80.26
# Client IPv4 - local
ipv4c=192.168.7.144
# Server's side of point-to-point /64 allocation
ipv6s=2001:470:1f08:6fd::1/64
# User's side of point-to-point /64 allocation
ipv6c=2001:470:1f08:6fd::2/64
echo "Configuring HE connection"
echo "Tunnel on HE site must be configured with updated router IP"
echo "Router should be configured to forward protocol 41 to local IP"
echo "Server IPv4 IP: $ipv4s"
echo "Client IPv4 IP: $ipv4c"
echo "Server IPv4 IP: $ipv6s"
echo "Client IPv4 IP: $ipv6c"
ip tunnel add he-ipv6 mode sit remote $ipv4s local $ipv4c ttl 255
ip link set he-ipv6 up
ip -6 addr add $ipv6c dev he-ipv6
ip -6 route add ::/0 dev he-ipv6
The last step is to configure protocol 41 forwarding on the router. HE uses 6to4 incapsulation.
In Sofaware / Check Point router WebUI, go to Security->Rules.
Press Add Rule button in order to add new rule. The rule should Allow and Forward protocol 41 destinated to the router IP to the machine where he-ipv6 is configured.
Final check - ping6 ipv6.google.com
Saturday, January 30, 2010
Subscribe to:
Posts (Atom)