#!/bin/bash
exec >/dev/console
exec </dev/console
exec 2>/dev/console
PATH=/usr/local/bin:/usr/local/etc:/usr/bin:/bin:/etc; export PATH

# Your IPv6 prefix
PREFIX=
# The host-part of the IPv6 address for this machine
ADDRESS=1
# The IPv4 address of the far side of your tunnel
TUNNEL=

echo 0 > /proc/sys/net/ipv6/conf/all/autoconf
echo 0 > /proc/sys/net/ipv6/conf/all/accept_ra
echo 0 > /proc/sys/net/ipv6/conf/all/accept_redirects
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
echo 0 > /proc/sys/net/ipv6/conf/all/router_solicitations

/bin/ifconfig eth0 add $PREFIX::$ADDRESS/64
/bin/route -A inet6 add $PREFIX::0/64 dev eth0

/bin/ifconfig sit0 up tunnel ::$TUNNEL
/bin/ifconfig sit1 up 
/bin/route -A inet6 add 3ffe::0/15 gw fe80::$TUNNEL dev sit1

/etc/radvd &