mzweilin / napt66

Automatically exported from code.google.com/p/napt66
39 stars 12 forks source link

如果我把拨号嵌入到 /etc/rc.local当中~拨号应该插到哪个位置呢? #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
 /etc/rc.local文件如下
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
dev=sit1
export LC_ALL=C
myip=$(ifconfig|grep -A2 'eth1.1'|grep 'inet addr:'|cut -d: -f2 |awk '{ print 
$1}')
ip tunnel add $dev mode sit remote 192.168.253.49 local $myip
ifconfig $dev up
ifconfig $dev add 2001:da8:2004:2301:0:5efe:$myip
route -A inet6 add 2000::/3 gw fe80::5efe:192.168.253.49 $dev

sysctl -w net.ipv6.conf.br-lan.forwarding=1
ip6tables -A INPUT -p icmpv6 -m mac --mac-source "00:17:59:80:74:10" -j DROP
radvd
ifconfig eth1.1 down
ifconfig eth1.1 up
insmod /nat66/napt66_bcm63xx.ko wan_if=sit1
#udhcpc -i eth1.1
exit 0

如果我把拨号插到启动napt66模块之前哪里可以么?

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
dev=sit1
export LC_ALL=C
myip=$(ifconfig|grep -A2 'eth1.1'|grep 'inet addr:'|cut -d: -f2 |awk '{ print 
$1}')
ip tunnel add $dev mode sit remote 192.168.253.49 local $myip
ifconfig $dev up
ifconfig $dev add 2001:da8:2004:2301:0:5efe:$myip
route -A inet6 add 2000::/3 gw fe80::5efe:192.168.253.49 $dev

sysctl -w net.ipv6.conf.br-lan.forwarding=1
ip6tables -A INPUT -p icmpv6 -m mac --mac-source "00:17:59:80:74:10" -j DROP
radvd
ifconfig eth1.1 down
ifconfig eth1.1 up
/etc/mentohust/mentohust
sleep 5s
insmod /nat66/napt66_bcm63xx.ko wan_if=sit1
#udhcpc -i eth1.1
exit 0
还是要提到更前呢?

Original issue reported on code.google.com by zxy...@gmail.com on 20 Apr 2011 at 5:13