Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: IPv6 tunnel through Virgin Media SuperHub.  (Read 9239 times)

RattyDAVE

  • Newbie
  • *
  • Posts: 4
    • View Profile
IPv6 tunnel through Virgin Media SuperHub.
« on: April 02, 2012, 07:41:15 AM »

Hi,

My Current set-up works fantastic. But due to progress I am being forced to change my cable modem to a cable modem / hub combination.

My Current setup is :

Internet -> Cable Modem (public ipv4) > Router (DD-WRT with the IPv6 Tunnel) (192.168.0.x) > Devices.

Router is running DD-WRT and has the following in the startup script.

Code: [Select]
#!/bin/sh
#sleep 30
logger -t www.startup Startup script started.

HE_tunnel () {
#***************************
#Settings start here
#***************************
#basic connection settings
SERVER_IP4_ADDR="216.66.80.26"

CLIENT_IPV6_ADDR="2001:470:xxxx:xxxx::2/64"
ROUTED_64_ADDR="2001:470:xxxx:xxxx::/64"
#account info to auto update endpoint
USERID="IamNOTgoingTOshowYOUthis"
PASSWD="Password"
TUNNELID="12345"

#####Optional/Advanced Settings######
#logging settings (set to /dev/null for no logging)
STARTUP_SCRIPT_LOG_FILE="/tmp/ipv6.log"
CRON_STATUS_LOG_FILE="/tmp/lastHEUpdate.log"
#Generated files paths
CRON_JOB_FILE="/tmp/report.sh"
RADVD_CONFIG="/tmp/radvd.conf"
#***************************
#Settings end here
#***************************
#insmod ipv6
#sleep 10
#get a hash of the plaintext password
MD5PASSWD=`echo -n $PASSWD | md5sum | sed -e 's/  -//g'`
#cut out the "/64" if user typed it in
ROUTED_64_ADDR=`echo $ROUTED_64_ADDR|cut -f1 -d/`
SERVER_IP4_ADDR=`echo $SERVER_IP4_ADDR|cut -f1 -d/`
CLIENT_IPV6_ADDR=`echo $CLIENT_IPV6_ADDR|cut -f1 -d/`
#update HE endpoint
echo -e wget -q "\042http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=AUTO&pass=$MD5PASSWD&user_id=$USERID&tunnel_id=$TUNNELID\042" -O $CRON_STATUS_LOG_FILE  >$CRON_JOB_FILE
chmod +x $CRON_JOB_FILE
wget -q "http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=AUTO&pass=$MD5PASSWD&user_id=$USERID&tunnel_id=$TUNNELID" -O $STARTUP_SCRIPT_LOG_FILE
#get wan ip for our own use


RETRIES=3
while [ -z ${WANIP} ]; do
# PPPoE devices are on ppp0, all others are on vlan1 or eth1; we try all
for DEV in "eth1" "ppp0" "vlan1"; do
WANIP=`ip -4 addr show dev ${DEV} | grep inet | awk '{print $2}' | cut -d/ -f1`
if [ -n "$WANIP" ]; then
logger -st HE_tunnel "External IP ${WANIP} found on device ${DEV}"
break 2
fi
done
let RETRIES-=1
if [ "$RETRIES" -gt 0 ]; then
logger -st HE_tunnel "No external IP found; trying again in 10 secs..."
sleep 10
else
logger -st HE_tunnel "No external IP found after 30 seconds; quitting"
exit 1
fi
done

echo "External IP:" $WANIP >> $STARTUP_SCRIPT_LOG_FILE
if [ -n $WANIP ]
then
echo "configuring tunnel" >> $STARTUP_SCRIPT_LOG_FILE
# The following commands are straight from HE's website
modprobe ipv6
ip tunnel add he-ipv6 mode sit remote $SERVER_IP4_ADDR local $WANIP ttl 255
ip link set he-ipv6 up
ip addr add $CLIENT_IPV6_ADDR/64 dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr
TEMP_ADDR=`echo $ROUTED_64_ADDR'1'`
# These commands aren't on HE's website, but they're necessary for the tunnel to work
ip -6 addr add $TEMP_ADDR/64 dev br0
ip route add 2000::/3 dev he-ipv6
#Enable IPv6 forwarding
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
# make sure to accept proto-41
iptables -I INPUT 2 -p ipv6 -i vlan1 -j ACCEPT
#make sure to not NAT proto-41
iptables -t nat -A POSTROUTING --proto ! 41 -o eth0 -j MASQUERADE
echo "starting radvd" >> $STARTUP_SCRIPT_LOG_FILE
#creating radvd.conf
echo "#generated by startup script" > $RADVD_CONFIG
echo "interface br0 {" >> $RADVD_CONFIG
echo "AdvSendAdvert on;" >> $RADVD_CONFIG
echo "prefix "$ROUTED_64_ADDR"/64 {" >> $RADVD_CONFIG
echo "AdvOnLink on;" >> $RADVD_CONFIG
echo "AdvAutonomous on;" >> $RADVD_CONFIG
echo "AdvRouterAddr on;" >> $RADVD_CONFIG
echo "};" >> $RADVD_CONFIG
echo "};" >> $RADVD_CONFIG
radvd -C $RADVD_CONFIG &
fi
}

#################################################################
###################### Start Running Here #######################
#################################################################

######## IPv6 Config ########
HE_tunnel
#############################

logger -t www.startup Startup script DONE.



The Future set-up :

Internet -> Cable Modem/SuperHub (192.168.10.x) > Router (DD-WRT with the IPv6 Tunnel) (192.168.0.x) > Devices.

Currently this does not work. I think it may be down to the Virgin SuperHub blocking protocol 41.

I have read on other forums that Virgin dont block protocol 41...

Any help would be great!

Thanks in advance.

DAVE
Logged

cholzhauer

  • Hero Member
  • *****
  • Posts: 2610
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #1 on: April 02, 2012, 07:48:51 AM »

You'll  need to change your public IP address to the private IP address since it looks like your DDWRT router is behind NAT now
Logged

RattyDAVE

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #2 on: April 02, 2012, 07:52:30 AM »

Yes it does that. I thought that too.

Code: [Select]
for DEV in "eth1" "ppp0" "vlan1"; do
WANIP=`ip -4 addr show dev ${DEV} | grep inet | awk '{print $2}' | cut -d/ -f1`
if [ -n "$WANIP" ]; then
logger -st HE_tunnel "External IP ${WANIP} found on device ${DEV}"
break 2
fi
done

So it will have 192.168.10.x address.

Thank you.
Logged

RattyDAVE

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #3 on: April 02, 2012, 07:53:45 AM »

Sorry forgot to mention IPv4 works perfect in both configurations.

Logged

RattyDAVE

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #4 on: April 04, 2012, 12:34:50 AM »

I have done a TCPDUMP and I can confirm that PROTOCOL 41 is not passed via the Superhub.

Logged

cholzhauer

  • Hero Member
  • *****
  • Posts: 2610
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #5 on: April 04, 2012, 05:09:28 AM »

There's your problem then
Logged

jtcloe

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #6 on: June 07, 2012, 08:47:04 PM »

You're getting a nat'ed IP.  The carrier wouldn't even begin to know to to pass the traffic to.

Remember that SIT tunnels aren't session oriented, so there is nothing for the providers NAT equipment to track back to (unlike a tcp session).
Logged

trintrax

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #7 on: January 03, 2013, 02:49:24 AM »

The VirginMedia SuperHub can be set to modem mode!
That means you can use your own router with a public IP without NAT.

I am using the SuperHub in modem mode together with Airport Extreme. It works without any problems together with tunnelbroker.

I would anyway suggest to set the SuperHub to modem mode! The integrated router is not something you would want to use...
Logged

buffalo0207

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: IPv6 tunnel through Virgin Media SuperHub.
« Reply #8 on: July 03, 2016, 06:40:00 AM »

Hi. I have just switched over to VirginMedia and now my current script that I had been using on my DD-WRT router no longer works. I am using the superhub in 'modem' mode.

Does anyone have a working script I could use, as I tried the one above this post by RattyDAVE and it still doesn't work.

Thanks.
Logged