DIVISION OF THE PROBLEM 1.
How to remove the (52 at present!!!) "tunnel adapter Local Area connection" shown in IPCONFIG ALL?
At this time, please try the following steps and see how it works:
1. Click Start, type cmd in the Start Search box, right click the cmd.exe, and then click Run as Administrator.
2. In the Command Prompt, type netsh int isa set state disabled, and press Enter.
DIVISON OF THE PROBLEM 2.
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
}
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
}
No comments:
Post a Comment