• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: IPv6 tunnel endpoint  (Read 2031 times)
pjsg
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: February 24, 2010, 07:13:01 PM »

I'm looking to use my plug as (mainly) a IPv6-IPv4 converter. I.e. it would manage a IPv6 tunnel back to a tunnel broker (e.g. Hurricane Electric at http://tunnelbroker.net/ ) and would drop the IPv6 packets onto the local network. I don't see any reason that this couldn't be done on a single interface.

Has anybody else gone to the trouble of building such a system? Any tips?

Thanks

philip
Logged

cbxbiker61
Global Moderator
Sr. Member
*****

Karma: 37
Posts: 488


View Profile
« Reply #1 on: February 24, 2010, 08:54:36 PM »

Yeah, Hurricane has been solid for me.  Your tunnel endpoint has to be visible to hurricane electric as the external ip address.  In my case I configured my external router to route all traffic from hurricane electric's ip4 address to my internal ip6 endpoints ip4 address.

Here's a script that I run on system startup to establish the tunnel.  The addresses have been changed.  It should give you a pretty good idea how to get the job done.

Code:
#! /bin/bash                                                                                 

if [[ $# != 1 ]]; then
        echo "usage: $0 up|down"
        exit 1                 
fi                             

PATH=/sbin:$PATH

if [[ $1 == up ]]; then
        #ip tunnel add he-ipv6 mode sit remote 216.218.226.238 local 216.146.103.100 ttl 255
        ip tunnel add he-ipv6 mode sit remote 216.218.226.238 local 192.168.0.254 ttl 255   
        ip link set he-ipv6 up
        ip addr add 2001:476:a:3f::2/64 dev he-ipv6
        #ip route add ::/0 dev he-ipv6
        ip route add ::/0 dev he-ipv6
        ip -f inet6 addr
        ip -6 addr add 2001:476:b:3f::/64 dev eth1
        sysctl -w net.ipv6.conf.all.forwarding=1 > /dev/null 2> /dev/null
        /usr/sbin/radvd -u radvd -C /etc/radvd.conf -m stderr_syslog -p /var/run/radvd/radvd.pid
fi

if [[ $1 == down ]]; then
        ip link set he-ipv6 down
        ip tunnel del he-ipv6
        sysctl -w net.ipv6.conf.all.forwarding=0 > /dev/null 2> /dev/null
        #[[ ! -f /var/run/radvd/radvd.pid ]] || kill $(cat /var/run/radvd/radvd.pid)
        killall radvd 2>/dev/null
        rm -f /var/run/radvd/radvd.pid
fi


Here's my /etc/radvd.conf

Code:
interface eth1
{
        AdvSendAdvert on;
        MinRtrAdvInterval 3;
        MaxRtrAdvInterval 10;
        prefix 2001:476:b:3f::/64
        {
                AdvOnLink on;
                AdvAutonomous on;
                AdvRouterAddr on;
        };
};

Logged

Pages: [1]
Print
Jump to: