6to4 for dd-wrt kernel 3.x


/ Published in: Bash
Save to your folder(s)

Following startup script enables:
* install missing kernel modules
* install 6to4 tunnel for dd-wrt with kernel versions 3.x
* restarts radvd with a new config


Copy this code and paste it in your HTML
  1. insmod ip_tunnel
  2. insmod sit
  3. sleep 4
  4. radvd -C /tmp/radvd.conf stop
  5. sleep 4
  6. IFC=`ifconfig vlan2`
  7. WANIP="$(echo $IFC | sed 's/.*addr:\(.*\)Bcast.*/\1/')"
  8. echo $WANIP
  9. if [ -n "$WANIP" ]
  10. then
  11. V6PREFIX=$(printf '2002:%02x%02x:%02x%02x' $(echo $WANIP | tr . ' '))
  12. ip tunnel add tun6to4 mode sit ttl 255 remote any local $WANIP
  13. ip link set tun6to4 mtu 1280
  14. ip link set tun6to4 up
  15. ip addr add $V6PREFIX:0::1/16 dev tun6to4
  16. ip addr add $V6PREFIX:1::1/64 dev br0
  17. ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4
  18. kill -HUP $(cat /var/run/radvd.pid)
  19. fi
  20. radvd -C /tmp/radvd.conf start

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.