/ Published in: Bash
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
* install missing kernel modules
* install 6to4 tunnel for dd-wrt with kernel versions 3.x
* restarts radvd with a new config
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
insmod ip_tunnel insmod sit sleep 4 radvd -C /tmp/radvd.conf stop sleep 4 IFC=`ifconfig vlan2` WANIP="$(echo $IFC | sed 's/.*addr:\(.*\)Bcast.*/\1/')" echo $WANIP if [ -n "$WANIP" ] then V6PREFIX=$(printf '2002:%02x%02x:%02x%02x' $(echo $WANIP | tr . ' ')) ip tunnel add tun6to4 mode sit ttl 255 remote any local $WANIP ip link set tun6to4 mtu 1280 ip link set tun6to4 up ip addr add $V6PREFIX:0::1/16 dev tun6to4 ip addr add $V6PREFIX:1::1/64 dev br0 ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 kill -HUP $(cat /var/run/radvd.pid) fi radvd -C /tmp/radvd.conf start