1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Migrating 6rd config to latest shibby version..

Discussion in 'Tomato Firmware' started by mbreslin, Apr 11, 2014.

  1. mbreslin

    mbreslin Networkin' Nut Member

    I've been using this script in wanup for ~2 years:

    echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
    echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6
    echo 0 > /proc/sys/net/ipv6/conf/default/disable_ipv6
    echo 1 > /proc/sys/net/ipv6/conf/default/forwarding
    modprobe sit
    insmod nf_conntrack_ipv6
    sleep 5 
    HOST6RD=$(nslookup 6rd.charter.com |grep "Address"|awk '{ print $3 }'|grep -v -m1)
    WANIP=$(ip -4 addr show dev vlan2 | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
    if [ -n "$WANIP" ]
    V6PREFIX=$(printf ' 2602:100:%02x%02x:%02x%02x' $(echo $WANIP | tr . ' '))
    ip tunnel add tun6rd mode sit ttl 255 remote any local $WANIP
    ip link set tun6rd mtu 1280
    ip link set tun6rd up
    echo 0 > /proc/sys/net/ipv6/conf/tun6rd/disable_ipv6
    echo 1 > /proc/sys/net/ipv6/conf/tun6rd/forwarding
    ip addr add $V6PREFIX:0::1/32 dev tun6rd
    ip addr add $V6PREFIX:1::1/64 dev br0
    ip -6 route add 2000::/3 via ::$HOST6RD dev tun6rd
    echo "interface br0 { \
    MinRtrAdvInterval 3; MaxRtrAdvInterval 10; AdvLinkMTU 1280; AdvSendAdvert on; \
    prefix $V6PREFIX::/64 { AdvOnLink on; AdvAutonomous on; AdvValidLifetime 86400; \
    AdvPreferredLifetime 86400; }; \
    RDNSS 2607:f428:1::5353:1 2607:f428:2::5353:1 { }; };" \
    > /tmp/home/root/radvd.conf
    radvd -C /tmp/home/root/radvd.conf start
    ip6tables -F
    ip6tables -P INPUT DROP
    ip6tables -P FORWARD DROP
    ip6tables -P OUTPUT DROP
    ip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    ip6tables -A INPUT -p ipv6-icmp -j ACCEPT
    ip6tables -I FORWARD -p ipv6-icmp -j ACCEPT
    ip6tables -A FORWARD -i br0 -j ACCEPT
    ip6tables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
    ip6tables -I OUTPUT -p ipv6-icmp -j ACCEPT
    ip6tables -A OUTPUT -j ACCEPT
    ip6tables -A OUTPUT -o lo -j ACCEPT
    We just purchased a new house and I'm adding a second N66U to extend wifi coverage, I noticed I haven't updated shibby's mod in quite awhile, I'm still on: Tomato Firmware 1.28.0000 MIPSR2-108 K26 USB AIO-64K

    Anyway, I'd definitely like both routers to be on the latest version (116) but I'm quite sure the way I did my 6rd tunnel no longer works. Anyone able to tell me what's changed and at least point me in the right direction for translating that script into the latest shibby version?


Share This Page