Giter VIP home page Giter VIP logo

napt66's Introduction

Introduction
IPv6-IPv6 Network Address Port Translation (NAPT66) is a stateful IPv6 NAT mechanism. Like IPv4 NAT, NAPT66 technique makes several hosts share a public IPv6 address. As a result, NAPT66 helps to hide the private network topology and promote network security. 

NAPT66 based on GNU/Linux is implemented in kernel space, which provides satisfied performance and portability. It has been ported to several open-source router firmware (e.g. OpenWrt) so that it can be run on low-end, commodity hardware (e.g. BCM63xx platform).

NAPT66 should be installed on a boundary router situated between two IPv6 networks. It performs stateful packet translation between internal IPv6 hosts and external IPv6 hosts. 
NAPT66 uses Application Level Gateways (ALGs) and DNS Proxy to deal with complex applications (like active FTP and DNS). More applications can travels NAPT66 in the future.

Tested Protocols
·HTTP 
·MMS 
·FTP - active and passive
·Telnet 
·ICMPv6 - echo request, echo reply,error messages(Destination Unreachable、Packet Too Big、Time Exceeded、Parameter Problem)

Limitations
In some certain scenarios, NAPT66 is unacceptable for these limitations.
·Breaking the end-to-end model
Several traditional NAT traversal techniques (e.g. ALGs, UPnP) may helps to solve the problem.
·No fragmentation
Avoiding fragmentation is one of the principles of IPv6. NAPT66 don’t support IPv6 fragmentation for the moment.

Members
Weilin Xu, Yigang Yang, Huiting Liu
They are from Grade 2008, School of Computer, Beijing Univ. of Posts & Telecom.

Acknowledgements
This work is supported by the Research Innovation Fund for College Students of Beijing University of Posts and Telecommunications (Grant No. 101104537) and guided by Lecturer Hua Zhang from Institute of Network Technology, BUPT.

napt66's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

fengpsky

napt66's Issues

编译trunk固件的问题

按照说明编译841 
trunk固件的时候,无法转发ipv6包,network和radvd的配置没有编��
�进固件。


Original issue reported on code.google.com by [email protected] on 6 Apr 2011 at 3:14

现在路由里ping ipv6已经没有问题了~~·我是通过设置isatap隧道和mentohust的·

root@OpenWrt:/# ping6 ipv6.google.com
PING ipv6.google.com (2404:6800:8005::93): 56 data bytes
64 bytes from 2404:6800:8005::93: seq=0 ttl=51 time=92.305 ms
64 bytes from 2404:6800:8005::93: seq=1 ttl=51 time=92.307 ms
64 bytes from 2404:6800:8005::93: seq=2 ttl=51 time=92.627 ms
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 92.305/92.413/92.627 ms
root@OpenWrt:/# ping6 ipv6.scau.edu.cn
PING ipv6.scau.edu.cn (2001:da8:2004:1000:202:116:160:48): 56 data bytes
64 bytes from 2001:da8:2004:1000:202:116:160:48: seq=0 ttl=61 time=1.249 ms
64 bytes from 2001:da8:2004:1000:202:116:160:48: seq=1 ttl=61 time=1.150 ms
64 bytes from 2001:da8:2004:1000:202:116:160:48: seq=2 ttl=61 time=1.064 ms
^C
--- ipv6.scau.edu.cn ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 1.064/1.154/1.249 ms

但现在电脑还不能ping通~~请问是什么原因呢?

Original issue reported on code.google.com by [email protected] on 19 Apr 2011 at 10:19

路由器网络通,但内网v6不通。

v6是使用isatap连接到上海交大。

dmesg不停输出:
get_ip6_by_name() failed。
内网的机器tracert:
C:\Users\gtr-mz>tracert ipv6.google.com.hk

通过最多 30 个跃点跟踪
到 ipv6.l.google.com [2404:6800:8003::67] 的路由:

  1    <1 毫秒    1 ms     1 ms  fc00:101:101::1
  2     *        *        *     请求超时。
  3     *        *        *     请求超时。
  4     *        *        *     请求超时。
  5     *        *        *     请求超时。
  6     *        *        *     请求超时。
  7     *        *        *     请求超时。
内网界面地址:
以太网适配器 本地连接:

   连接特定的 DNS 后缀 . . . . . . . :
   IPv6 地址 . . . . . . . . . . . . : fc00:101:101:0:14df:68cf:8fa5:b7b8
   临时 IPv6 地址. . . . . . . . . . : fc00:101:101:0:2033:efb9:dba2:9ea3
   本地链接 IPv6 地址. . . . . . . . : fe80::14df:68cf:8fa5:b7b8%11
   IPv4 地址 . . . . . . . . . . . . : 192.168.0.248
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   默认网关. . . . . . . . . . . . . : fe80::2d0:b7ff:fec6:8af0%11
                                       192.168.0.1

路由器的ip地址;
17: is0@NONE: <NOARP,UP,LOWER_UP> mtu 1480 qdisc noqueue state UNKNOWN 
    link/sit 61.151.75.48 brd 0.0.0.0
    inet6 2001:da8:8000:d011:200:5efe:3da1:4f30/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::200:5efe:3da1:4f30/64 scope link 
       valid_lft forever preferred_lft forever



Original issue reported on code.google.com by [email protected] on 1 Aug 2011 at 3:04

请问在ubuntu中如何能成功编译napt66?

我没有路由器,我想用运行ubuntu的PC完成路由功能。但是在mak
e的遇到错误

tobacco@tobacco-ubuntu:~/文档/napt66-0.2$ make
make -C /lib/modules/2.6.35-30-generic/build M=/home/tobacco/文档/napt66-0.2 
modules
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.35-30-generic'
  CC [M]  /home/tobacco/文档/napt66-0.2/napt66_main.o
  CC [M]  /home/tobacco/文档/napt66-0.2/napt66_conntrack.o
/home/tobacco/文档/napt66-0.2/napt66_conntrack.c: In function 
‘get_ip6_by_name’:
/home/tobacco/文档/napt66-0.2/napt66_conntrack.c:265: error: incompatible 
types when assigning to type ‘struct inet6_ifaddr *’ from type ‘struct 
list_head’
/home/tobacco/文档/napt66-0.2/napt66_conntrack.c:272: error: ‘struct 
inet6_ifaddr’ has no member named ‘if_next’
make[2]: *** [/home/tobacco/文档/napt66-0.2/napt66_conntrack.o] 错误 1
make[1]: *** [_module_/home/tobacco/文档/napt66-0.2] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.35-30-generic'
make: *** [all] 错误 2
tobacco@tobacco-ubuntu:~/文档/napt66-0.2$ 

内核是2.6.35-30。其实我以前也咨询过这个问题,知道是因为��
�核更新了的问题。我想问一下现在有没有解决方法?谢谢。

Original issue reported on code.google.com by [email protected] on 14 Jul 2011 at 4:15

我的HA930E有物理wan

我的HA930E有物理wan,但是据说硬件是把lan4端口虚拟成了wan,�
��样如果我刷这个硬件的话岂不是很悲剧?
应该怎样解决呢?还是可以直接刷这个openwrt固件?

Original issue reported on code.google.com by [email protected] on 30 May 2011 at 9:08

使用这个固件mentohust拨不鸟号???

** Netcard:     eth1.1
** Gateway:     172.16.80.254
** DNS地址:   202.116.160.33
** 智能重连:        222.88.95.169
** 认证超时:        8秒
** 响应间隔:        30秒
** 失败等待:        15秒
** 允许失败:        2次
** 组播地址:        锐捷
** DHCP type:   认证后
** DHCP Script: udhcpc
>> Search server...
** 认证MAC:   00:1a:a9:4e:22:7b
>> 发送用户名...
>> 发送密码...
>> 认证成功!
$$ 系统提示:        
4▒▒19▒գ▒▒▒ɽ▒▒▒▒һ▒▒ͣ▒▒(45▒▒48▒▒▒▒▒�
��)▒▒▒▒ʱ▒▒▒▒▒▒▒▒▒▒▒жϡ▒
$$ 计费提示:
>> 正在获取IP...
udhcpc (v1.15.3) started
Sending discover...
Sending discover...
Sending discover...


然后就卡在这里了。。。

Original issue reported on code.google.com by [email protected] on 18 Apr 2011 at 5:12

请问如何更新ipv6地址

学校是用dhcp分配ipv6地址,在锐捷认证之后需要更新ipv6地址��
�可以使用ipv6,一开机分配的ipv6地址无法使用ipv6。

Original issue reported on code.google.com by [email protected] on 10 Apr 2011 at 4:24

关于1.1固件访问外网

刷了1.1固件,通过ssh可以ping通外网v4和v6,但是通过子网无论
是v4还是v6都无法连接,请问是什么问题?改怎么设置?


Original issue reported on code.google.com by [email protected] on 29 Sep 2011 at 2:35

是否有4M的固件?

是否会用4M的集成固件?
我所用的是FW300R刷到841N EN的固件.
想用OP只是想支持ipv6, 
不需要USB,BT等大型下载支持(未做任何改机)

谢谢解答


Original issue reported on code.google.com by [email protected] on 9 Jul 2011 at 3:54

napt66模块加载错误

第一次加载时显示linux版本不对(固件的linux版本是2.6.37.6)��
�用ultraedit修改后再次加载,显示Segmentation fault。


Original issue reported on code.google.com by [email protected] on 14 Apr 2011 at 5:10

关于编译NAPT66模块的问题

我用的是tp-link 841n 
v7的路由,用的是最新的trunk版的固件,2.6.37.6版的内核,照��
�程修改编译了以后insmod napt66_bcm63xx.ko 时提示 Invalid module 
format
下载了napt66-0.2.tar.gz直接在ubuntu里用make编译提示

yxrlz@yxrlz-virtual-machine:~/napt66$ make
make -C /lib/modules/2.6.38-8-generic/build M=/home/yxrlz/napt66 modules
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.38-8-generic'
  CC [M]  /home/yxrlz/napt66/napt66_main.o
  CC [M]  /home/yxrlz/napt66/napt66_conntrack.o
/home/yxrlz/napt66/napt66_conntrack.c: In function ‘get_ip6_by_name’:
/home/yxrlz/napt66/napt66_conntrack.c:265:11: error: incompatible types when 
assigning to type ‘struct inet6_ifaddr *’ from type ‘struct list_head’
/home/yxrlz/napt66/napt66_conntrack.c:272:21: error: ‘struct inet6_ifaddr’ 
has no member named ‘if_next’
make[2]: *** [/home/yxrlz/napt66/napt66_conntrack.o] 错误 1
make[1]: *** [_module_/home/yxrlz/napt66] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.38-8-generic'
make: *** [all] 错误 2

请问该如何解决.

Original issue reported on code.google.com by [email protected] on 25 May 2011 at 7:38

ipv6上不了了

我是个新手,请指教
db120-wg刷了ipv6固件,在朋友那可以上ipv6,但是拿到我这就不�
��了。在他那添加了ipv6 
gateway:fc00:0101:0101::1/64,然后修改rc.local中的eth1.1为eth0,其��
�的ip都是学校的静态ip,重启后可以上ipv6.
但是到我这以后只修改了ipv4的静态ip,但是怎么也上不了ipv6�
��怎么回事,请指教

Original issue reported on code.google.com by [email protected] on 5 May 2011 at 1:33

napt66结合mentohust设置isatap完美成功使用IPv6共享!!!!

通过参阅大量大神的做法,经过不断尝试!终于成功了!!
感谢tsl老兄的教程!!http://code.google.com/p/napt66/issues/detail?id=6
我只修改了vi /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
/etc/mentohust/mentohust -u锐捷帐号 -p锐捷密码 -neth1.1 -t8 -e30 -r15 
-a1 -d2 -b2 -v3.95 -l2 -i172.16.80.215 -m255.255.255.0 -g172.16.80.254 
-s202.116.160.33 -f3_95.mpf -w
sleep 1s
insmod /nat66/napt66_bcm63xx.ko wan_if=sit1
#udhcpc -i sit1
udhcpc -i eth1.1
exit 0

内容解释(需要修改):
192.168.253.49:隧道另一边的IP地址,可以通过ping隧道地址获得
:如ping isatap.XXXX.edu.cn,返回的IP地址就是
2001:da8:2004:2301:0:5efe:$myip:电脑使用isatap隧道的时候,可以通�
��运行ipconfig 
/all查看isatap隧道的信息,把2001开头的v6地址复制上~其中关键
字$myip保留,就是代表隧道地址中的v4部分
fe80::5efe:192.168.253.49:同样通过ipconfig /all查看,网关部分!
00:17:59:80:74:10:这个mac地址我没有改~~~不知道和MAC克隆有没有
关系~~知道的告诉我一声~~
然后是锐捷的堆参数,你怎么拨号成功怎么改吧~~这个不说了

其他原文的修改部分:
增加sleep 1s命令,延时1秒
insmod /nat66/napt66_bcm63xx.ko wan_if=eth1.1改为insmod /nat66/napt66_bcm63xx.ko wan_if=sit1
另外tsl老兄是把udhcpc -i eth1.1注释掉~我发现我把这个注释掉是不能上网的~~~~这个大家自己试试吧~~~~

现在每次reboot路由都自动拨号!这叫一个爽!!!

上成果图!!!
附上我的hosts文件


Original issue reported on code.google.com by `[email protected]` on 20 Apr 2011 at 12:30

Attachments:
* [1.jpg](https://storage.googleapis.com/google-code-attachments/napt66/issue-16/comment-0/1.jpg)
* [2.jpg](https://storage.googleapis.com/google-code-attachments/napt66/issue-16/comment-0/2.jpg)
* [3.jpg](https://storage.googleapis.com/google-code-attachments/napt66/issue-16/comment-0/3.jpg)
* [hosts](https://storage.googleapis.com/google-code-attachments/napt66/issue-16/comment-0/hosts)

编译ar71xx的napt66过程(出错)不知如何解决

What steps will reproduce the problem?
1. 
按照其他网站的教程先编译了一次openwrt固件,trunk,估计是��
�新的,trunk/dl 
有个文件名为linux-2.6.39.4.tar.bz2,这次编译和平时我编译的不�
��的地方就是在make menuconfig的时候多选了那个有toolchain的选项

2. 我的电脑上的目录 
home下有个backfire,这个里面是编译openwrt的trunk文件
   home下还有个src目录,我把1里说的linux-2.6.39.4.tar.bz2和napt66-0.2.tar.gz压缩包解压在了里面


3. cd到linux-2.6.39.4目录
make ARCH=mips 
CROSS_COMPILE=/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32
/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mip
s_r2_gcc-4.5-linaro_uClibc-0.9.32/bin/mips-openwrt-linux- menuconfig,

然后弹出窗口,什么也没选,退出后,输入make,然后一直出�
��我选择的东西,我按住enter一会后就没有再让我选择,一直�
��编译完

4 修改napt-0.2的makefile文件 

# Makefile under 2.6.25
ifneq ($(KERNELRELEASE),)
#kbuild syntax. dependency relationshsip of files and target modules are listed 
here.
obj-m := napt66.o
napt66-objs := napt66_main.o napt66_conntrack.o napt66_nat.o 
napt66_hash_table.o napt66_ftp_alg.o
else
PWD  := $(shell pwd)
KVER ?= $(shell uname -r)
KDIR 
:=/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32/OpenWrt-Too
lchain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mips_r2_gcc-4.5
-linaro_uClibc-0.9.32/bin/
all: 
    $(MAKE) -C $(KDIR) M=$(PWD) modules ARCH=mips CROSS_COMPILE=/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/bin/mips-openwrt-linux-
clean:
    rm -rf .*.cmd *.o *.mod.c *.ko .tmp_versions *.symvers *.order
endif

然后cd到napt66-0.2目录 make就提示出错

bbs111@ubuntu:~/src/napt66-0.2$ make
make -C 
/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32/OpenWrt-Toolc
hain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mips_r2_gcc-4.5-l
inaro_uClibc-0.9.32/bin/ M=/home/bbs111/src/napt66-0.2 modules ARCH=mips 
CROSS_COMPILE=/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32
/OpenWrt-Toolchain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mip
s_r2_gcc-4.5-linaro_uClibc-0.9.32/bin/mips-openwrt-linux-
make[1]: Entering directory 
`/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32/OpenWrt-Tool
chain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mips_r2_gcc-4.5-
linaro_uClibc-0.9.32/bin'
make[1]: *** No rule to make target `modules'.  Stop.
make[1]: Leaving directory 
`/home/bbs111/backfire/trunk/build_dir/target-mips_r2_uClibc-0.9.32/OpenWrt-Tool
chain-ar71xx-for-mips_r2-gcc-4.5-linaro_uClibc-0.9.32/toolchain-mips_r2_gcc-4.5-
linaro_uClibc-0.9.32/bin'
make: *** [all] Error 2









What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 24 Sep 2011 at 2:41

不更改内核代码使用NAPT66功能

现在NAPT66模块要求更改内核IPv6转发代码才能使用,所以不能�
��装到现在OpenWrt中。其实有办法不用更改内核使用NAPT66。

当初更改内核IPv6转发代码是因为Linux内核IPv6协议栈限制了节�
��不能同时作为路由器和主机。
这个限制在net.ipv6.conf.all.forwarding参数中体现。下面是转载的�
��料:

=================
forwarding

Type: BOOLEAN
Default: FALSE if global forwarding is disabled (default), otherwise TRUE
設定主機/路由的interface-specific動作.

注意:推薦所有interface(界面)使用相同的設定.混合路由器/主機
的想法真是難得.

Value FALSE: By default, Host behaviour is assumed. This means:
IsRouter 標緻沒有在Neighbour Advertisements當中.
當需要的時候就發送路由請求.
如果accept_ra是TRUE (default), 接受路由廣告.
如果accept_redirects 是 TRUE (default), 接受重定向.
Value TRUE: 
如果具備本地forwarding(轉寄),路由器動作為假定.這和上面的情
況相反:
IsRouter 標緻存在於Neighbour Advertisements當中.
不發送路由請求.
忽略路由廣告.
忽略重定向.
======================

由上可知,当net.ipv6.conf.all.forwarding=1时,系统才可以转发IPv
6数据包。但这样就导致系统所有网络接口,包括WAN在内,无�
��获得IPv6地址配置信息,当然就不能给内网主机提供IPv6服务�
��。

在早前的方案中,我们更改内核的ipv6转发函数,使net.ipv6.conf
.all.forwarding=0时也转发包,这样就可以用内核自身的功能来�
��动配置WAN口IPv6信息。

如果有一个第三方的软件来自动配置WAN口IPv6信息,就可以不�
��内核限制了。即,令net.ipv6.conf.all.forwarding=1,开通IPv6转发
,然后通过第三方软件来配置WAN口IPv6信息。

因为Linux内核已经实现了无状态地址自动配置的功能,目前没
有现成的第三方软件满足我们的要求。但可以通过shell脚本调
用现成的ndisc6来实现。

ndisc6中包含了rdisc6程序,它可以向网络中发送RS报文,触发路
由器回复RA报文,并解析到shell中。比如:

# rdisc6 wlan1

Soliciting ff02::2 (ff02::2) on wlan1...

Hop limit                 :           64 (      0x40)
Stateful address conf.    :           No
Stateful other conf.      :           No
Router preference         :       medium
Router lifetime           :         1800 (0x00000708) seconds
Reachable time            :  unspecified (0x00000000)
Retransmit time           :  unspecified (0x00000000)
 Source link-layer address: 00:18:B9:2C:C2:C4
 MTU                      :         1500 bytes (valid)
 Prefix                   : 2001:da8:215:3320::/64
  Valid time              :      2592000 (0x00278d00) seconds
  Pref. time              :       604800 (0x00093a80) seconds
 from fe80::218:b9ff:fe2c:c2c4

显然,通过字符串处理工具配合ifconfig,ip等工具,就可以把I
Pv6信息配置到网络接口了。

配置WAN口IPv6参数涉及的操作有:
1) 添加接口IPv6地址。
按RFC规定,将MAC地址转为EUI-64格式,与接收到的子网前缀连��
�,生成无状态ipv6地址,用ifconfig命令配置到wan接口。
2) 添加默认路由。
默认路由涉及到路由器本地链路地址和wan接口名称,在上面��
�例子中,路由器本地链路地址是fe80::218:b9ff:fe2c:c2c4,wan接口�
��wlan1,所以用
ip -6 route add default via fe80::218:b9ff:fe2c:c2c4 dev wlan1
就可以了。

当然,完整的功能还应包括检测接口状态等。有兴趣的童鞋��
�以试一试。

Original issue reported on code.google.com by [email protected] on 18 Mar 2011 at 10:20

(原创)交叉编译 构建基于 AR71XX 平台的 napt66 模块 (内核版本>2.6.35)

基本要求:
一:linux系统,能联网(当然你要是把相关的数据拷贝过去没
有网络也行)
二:正确的交叉编译工具链  
(我使用的是构建openwrt固件时生成的工具链,前缀为mips-openw
rt-linux-)
三:最好把交叉编译工具链的目录添加到系统变量里面(当��
�,没有也行,只是下面你填写交叉编译工具链会比较长而已�
��
编译步骤
1.下载对应版本的linux源代码 。(我的是linux 2.6.37.6 
大约70MB)
2.解压到/usr/src。            (我的是解压到 
/usr/src/linux-2.6.37.6)
3.进入linux源代码顶层目录 ,然后 make ARCH=mips 
CROSS_COMPILE=<你所对应的交叉编译链> menuconfig   
(没有<>)(我的是make ARCH=mips 
CROSS_COMPILE=mips-openwrt-linux-)(我事先已经构建了交叉编译工��
�链)
4.然后 make   (漫长的时间)
5.下载修正后的napt66源代码,解压     
(我的是解压/usr/napt66)
6.修改Makefile    
将kdir修改为你所编译的linux内核代码(我的是/usr/src/linux-2.6.3
7.6),然后在target all 最后面添加 ARCH=mips 
CROSS_COMPILE=<你所对应的交叉编译链> (和第3步的相同) ,保存
7.make 即可。然后目录下就会有napt66.ko
8.剩下的就是将napt66.ko拷贝到路由器中即可,然后insmod 
napt66.ko wan_if=eth1.1  
(可能你们的与我的接口不一样,修改即可)

希望大家有空的话多和我联系交流。QQ:447491275
附件:我构建的napt66.ko模块

Original issue reported on code.google.com by [email protected] on 30 Jun 2011 at 8:19

Attachments:

Errors During Build

What steps will reproduce the problem?
1. Built 3.2.17 kernel
2. Did a make on the source code.

What is the expected output? What do you see instead?
I'm seeing errors on incompatible type conversion. 

What version of the product are you using? On what operating system?
I'm using V0.2 on ubuntu server 12.04

Please provide any additional information below.
I looked into the kernel code. And the fields used in include/net/if_inet6.h 
were changed on 3/17/2010. I was wondering if the code has been updated to 
reflect these changes or not?

Original issue reported on code.google.com by [email protected] on 10 Aug 2012 at 7:53

原生双栈网格怎么设置?

你好,我是华南农业大学的学生。我今天刚问了一下,他们��
�我们学校的IPV6是原生双栈网络,但是按你在之前的回答,好
像我的情况不适用。所以请教一下。另外,我对IPV6不是太熟�
��,可能有些问题理解得不太好。打扰了。

Original issue reported on code.google.com by [email protected] on 19 Apr 2011 at 7:49

咨询关于web/portal认证

我把路由器刷了贵组在downloads里提供的固件,ipv6没问题很好�
��,我在视频上看到还有一个web/portal认证的功能,我在openwrt�
��了找,有一个usermanage选项,不知道是不是用来干这个的,��
�多次尝试并没有出现视频里的认证网页,都是打网页直接就�
��了。我想咨询一下这个认证功能该怎么用,是不是需要在ssh
里边设置?

Original issue reported on code.google.com by [email protected] on 6 Aug 2011 at 3:08

centos 6.1 内网无法访问,转发是好的

系统是Centos 6.1 x86_64的

ko编译成功

用的是isatap隧道,服务器已经打通隧道

radvd启动后给下面的机器发完地址后能够ping 通 sit1 
但就是出不去

检查了fowward都是正常的

Original issue reported on code.google.com by [email protected] on 12 Dec 2011 at 10:49

redhat as4上编译错误,求解

 make
make -C /lib/modules/2.6.9-5.ELsmp/build M=/root/napt66-0.2 modules
make[1]: Entering directory `/usr/src/kernels/2.6.9-5.EL-smp-i686'
  CC [M]  /root/napt66-0.2/napt66_main.o
In file included from /root/napt66-0.2/napt66_main.c:13:
/root/napt66-0.2/napt66_main.h:19:1: warning: "NIP6" redefined
In file included from include/asm/system.h:5,
                 from include/asm/processor.h:18,
                 from include/asm/thread_info.h:16,
                 from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from include/linux/module.h:10,
                 from /root/napt66-0.2/napt66_main.c:2:
include/linux/kernel.h:208:1: warning: this is the location of the previous 
definition
/root/napt66-0.2/napt66_main.c:39: error: syntax error before "inet6_addr_flag"
/root/napt66-0.2/napt66_main.c:39: warning: type defaults to `int' in 
declaration of `inet6_addr_flag'
/root/napt66-0.2/napt66_main.c:39: warning: data definition has no type or 
storage class
/root/napt66-0.2/napt66_main.c: In function `init_module':
/root/napt66-0.2/napt66_main.c:109: error: `false' undeclared (first use in 
this function)
/root/napt66-0.2/napt66_main.c:109: error: (Each undeclared identifier is 
reported only once
/root/napt66-0.2/napt66_main.c:109: error: for each function it appears in.)
/root/napt66-0.2/napt66_main.c:116: warning: assignment from incompatible 
pointer type
/root/napt66-0.2/napt66_main.c:117: error: `NF_INET_PRE_ROUTING' undeclared 
(first use in this function)
/root/napt66-0.2/napt66_main.c:124: warning: assignment from incompatible 
pointer type
/root/napt66-0.2/napt66_main.c:125: error: `NF_INET_POST_ROUTING' undeclared 
(first use in this function)
make[2]: *** [/root/napt66-0.2/napt66_main.o] Error 1
make[1]: *** [_module_/root/napt66-0.2] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.9-5.EL-smp-i686'
make: *** [all] Error 2

Original issue reported on code.google.com by [email protected] on 9 Dec 2011 at 7:16

x86固件做好了,但是很纠结,help!

不明白~~我是用https://dev.openwrt.org/ticket/9467这个makefile编译k
o的,但是不论用rg100还是x86平台(就算识别了双网卡)还是��
�down机然后自动重启,真的搞不定了……我说说都做过哪些实
践
===============================================
1、双网卡x86主机刷官方rc5,uname 
-r查到内核是2.6.32.27,固件版本可以看到是r27608,然后我用ubu
ntu来svn co 
-r27608来下载源码,将napt66的makefile放进pakage/下面,make 
menuconfig的时候选上napt66,编译完之后就得到napt66的ipkg安装包
和独立的napt66.ko了,然后scp上传到x86的openwrt,安装后立即加�
��没有问题,lsmod也看得到napt66,但是内网机器还是上不了v6��
�然后重启openwrt,/etc/init.d/napt66 start(或者inmod napt66.ko 
wan_if=eth1.1)都会死机重启!!……

2、rg100a刷官方rc5,后面的操作和现象同上……

3、这次成功了……
一 svn co svn://svn.openwrt.org/openwrt/branches/backfire/
二 ./scripts/feeds update -a &&./scripts/feeds install -a&&make defconfig
三 将napt66的makefile放进pakage/下面,make 
menuconfig的时候选上napt66
四 make 

这次(就是昨晚orz)编译的是x86平台的固件……直接拿自己��
�译出来固件刷到机器上面,openwrt开机后lsmod惊讶地发现napt66�
��常运行,然后radvd防火墙等等各种设置……………………然�
��这台x86主机就变成带vsftpd/ushare/samba/napt66/脱机下载等功能的
openwrt路由器了……现在在工作中。

尽管x86成功了,但是我不明白啊!为什么直接用编译出来的��
�件napt66就能工作,单独上传napt66.ipkg或者ko再加载就会死机啊
~~!going mad!

还有一台rg100a~刷这里的固件的话会变得很奇怪,路由器能pi
ng6通www.kame.net和ipv6.google.com但是六维空间和52v6就不行~tracero
ute可以看到是有环路跳不出去,(据我的观察,与此同时我��
�ubuntu也是相同的症状,有些v6网站ping不通,而windows没有问题
,我发现两个系统获取到的v6ip不同,于是我将ubuntu的ip手动��
�置为windows下面获取的ip,然后就正常了),我推测应该是学�
��的dhcp分配变成了有状态,而这个固件不能在这个环境下获��
�到正确的ip?另外upnp的表现也不是很好————鉴于这两个�
��因我还是想刷一个新一点的固件~~但是就遇到了上面的死
机问题~~~

i need help!!

Original issue reported on code.google.com by [email protected] on 19 Sep 2011 at 5:23

欢迎各位网友来交流

大家好,我代表NAPT66开发团队欢迎大家来这里交流。有任何��
�见或建议请及时知会我们,谢谢!
ps:鼓励使用母语。


Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 8:06

关于BACKFIRE的编译问题

我用的是UBUNTU 
11.04,编译的包全部都齐(因为编了几次新的版本),包括BAC
KFIRE和TRUNK。用最新的BACKFIRE按你们的PDF教程修改,(NAPT66文��
�夹直接从你的1.1固件里提取,RADVD。CONF(这个你放了两个位�
��,1。1的固件里,和你的教程有点不一致) 
之类需要的文件我都直接提了出来,我太懒了)按照你的教��
�去改,出来的固件可以用,PING 
IPV6.google.com能解释出地址,但是不通,也不能上V6的网站,路
由是RG100A和DB120。看了接口的地址,WAN口的拿到的IPV6地址是��
�确的。
另外我直接刷你们的1.1版固件,MENTOHUST经常会断线,这个不��
�道是什么问题。

Original issue reported on code.google.com by [email protected] on 13 May 2011 at 7:22

can not connect to ipv6 ftp

I am run Napt66 on a linux route, kernel is  2.6.32-5. On the router,I can`t 
connect to ipv6 ftp, such as "run6.hit.edu.cn". On the client PC, try to 
connect ipv6 ftp, the router crash. When removed napt66 module, I can connect 
ipvt ftp on router.
what`s wrong with me, please help me.

Original issue reported on code.google.com by [email protected] on 29 Nov 2011 at 3:31

一个问题

下载了1.1版刷进路由,配置了一下可以通过isatap隧道方式连��
�IPv6网络并共享上网了。
因为用IPv6主要是到六维空间之类的PT站下载资源,多数下�
��速度都10M/s左右。
用了路由器共享IPv6自后再下载,所有客户机速度加起来始终�
��不过5M/s,同样资源不用路由器共享下载又回到10M/s左右速度
。
而且在高速下载的时候网页几乎一点打不开,但IPv6下载速度�
��旧。

于是我开始寻找问题,后来发现是CPU占用率太高,ssh连接路��
�器执行命令top 
-bn1几分钟后才有响应,一个名为irq的进程占了97%的CPU。
查了些资料找到了答案:
irq的作用就是执行硬件中断请求,于是找到问题的根源了,na
pt66模块是运行在内核模式下的,在Linux下内核模式的程序如��
�主动放弃占有CPU,别的程序是别想使用CPU的。
大量的IPv6数据处理,使得CPU几乎一直被napt66所占据,自然网�
��要想打开就很困难了。

验证了一下自己的猜测,把IPv6下载停了,网络立刻恢复正常�
��

由于路由器硬件的限制,这种方式共享的IPv6网络也只是浏览�
��页,少量的下载可以满足。
要么就专门用PC装Linux做软路由可以满足大量IPv6数据处理的需
求。

Original issue reported on code.google.com by [email protected] on 19 Mar 2011 at 3:09

napt66 for tomato.RAF

简述:

移植napt66到tomato.RAF,tomato内核版本是2.6.22.19,移植需要修改�
��许代码。tomato固件对ipv6的使用很多都配置好了,包括radvd等
配置,可能需要关闭掉这些默认配置,进行自定义配置。修��
�内核少许代码不知道是否会带来兼容性问题。

修改代码:

napt66
 napt66_main.c 
  117 NF_INET_PRE_ROUTING  ->  NF_IP6_PRE_ROUTING
  125 NF_INET_POST_ROUTING  ->  NF_IP6_POST_ROUTING

 napt66_conntrack.c
  305 net = sock_net((const struct sock *)sock->sk);  ->  /*net = sock_net((const struct sock *)sock->sk);*/
  306 dev = dev_get_by_name(net,if_name);  ->  dev = dev_get_by_name(if_name);

 napt66_ftp_alg.c
  9 #define INET6_ADDRSTRLEN 46
    #define IPPROTO_TCP 6

编译成功,ko文件出现。

编译tomato固件,修改内核代码什么的不多说了

配置使用:
1.路由器上ipv6设置选为其他,,关闭路由器自带的radvd广播,
路由器ipv6静态地址设置成手动fc00:101:101::1,接受远程访问自w
an。
2.自行编译一个改完代码版radvd进路由,添加配置文件启动radv
d
interface br0
{
  AdvSendAdvert on;
  MinRtrAdvInterval 5;
  MaxRtrAdvInterval 10;

  AdvManagedFlag off;
  AdvOtherConfigFlag off;
  AdvDefaultPreference high;

  prefix fe00:0101:0101::/64
  {
    AdvOnLink on;
    AdvAutonomous on;
    AdvRouterAddr on;
  };

};
启动后,加载模块:insmod napt66.ko wan_if=vlan1
3.测试,电脑ping6 ipv6.google.com全部超时,路由ping6 
ipv6.google.com全部正常,通过修改napt66源代码,添加调试信息��
�现数据包转换向wan发出正常,数据包从wan接收到并且转换也�
��常,问题出在接收到wan的数据包NAT转换后交给系统内核后,
内核貌似并没有把数据包转交给内网电脑,不知道是什么原��
�,在此向大家求助了。

Original issue reported on code.google.com by [email protected] on 17 Sep 2011 at 3:01

Attachments:

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

 /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 [email protected] on 20 Apr 2011 at 5:13

Multiwan怎么删除

DB120安装的NAPT66_firmware_Beta_1.0,无线连接不稳定,说要把 
multiwan删除>


不知道怎么删除啊?

在system →software中找不到multiwan怎么办

请指教 

谢谢了

Original issue reported on code.google.com by [email protected] on 18 Jun 2011 at 1:52

我个人觉得NAPT66这个还是不要做的好。

IPV6扩展了IP就是为了避免NAT,如果做了NAT的话,会有很多问��
�的。
例如IPV4的NAT穿透,就挺烦的。。。

建议在路由器上直接用网桥,如果是V6数据包,直接把以太网
包转发。

Original issue reported on code.google.com by [email protected] on 19 Jul 2011 at 2:46

上传一个使用OpenWrt编译环境编译生成napt66安装包文件的Makefile

上传一个使用OpenWrt编译环境编译生成napt66安装包文件的Makefil
e
使用方法:
将附件中的文件解压到OpenWrt源码目录/package/下,make 
menuconfig到NetWork-Netfilter 
Extensions下找到napt66并选择(M),编译OpenWrt就可以生成kmod-napt66�
��ipk安装包文件了,或者选择(*),直接编译到固件中。

因在此下载的napt66-0.2.tar.gz不是最新的,故做了一个svn最新版
本的patch在patchs目录下,还有napt66的Makefile,也被修改以适应O
penWrt编译,见110-Makefile.patch。

files目录下有个napt66的初始化脚本(隧道方式),会被安装到
/etc/init.d/napt66,请安装后参考里面的注释自行修改以适应自��
�的IPv6网络。
使用方法:
   启动napt66:/etc/init.d/napt66 start
   停止napt66:/etc/init.d/napt66 stop
还可以使用的参数有restart(重启),enable(开机自启动),disab
le(取消开机自启动)

Original issue reported on code.google.com by [email protected] on 14 Mar 2012 at 11:11

Attachments:

加载napt66.ko,是不是一定要双网卡?

本来打算用闲置双网卡主机安装openwrt当路由器,但是其中一�
��8139的pci网卡驱动不了,所以打算改成单网卡nat主机,但是��
�载napt66.ko之后会出现两列字符,然后自动重启。napt66是不是�
��定要双网卡?

Original issue reported on code.google.com by [email protected] on 11 Sep 2011 at 12:54

如何交叉编译

我的路由是tp-link 841 ar7241 
cpu,没法用BCM的固件和安装包,应该怎样交叉编译?

Original issue reported on code.google.com by [email protected] on 26 Mar 2011 at 1:54

关于802.1x 认证的咨询

我偶然间看到一个视频介绍ipv6net技术,大家都知道现在在咱�
��国家只有在教育网才部分试运行ipv6,很荣幸我们学校也开��
�这项服务,看过贵组关于这个项目的介绍后,我大体明白了�
��点点其中的原理,但是,同时我也有了一个问题,就是关于
802.1x认证的忧虑,我对于其他学校不是很了解,就拿我们学��
�来说,学校是通过一个叫锐捷认证的802.1x程序来屏蔽路由器�
��,现在ipv6net是通过路由器升级固件而实现,如果这样的话��
�认证问题成为绊脚石,我们学校的802.1x锐捷认证要绑定mac,�
��定ip和网关,同时,认证成功后每隔30秒计算机的认证程序��
�会给服务器发一个心跳包来声明在线。我看到视频里也介绍�
��关于802.1x的解决方案,是用的中继技术。如果认证都不能通
过的话,更别谈其他的技术了。我想咨询的是,就拿锐捷而��
�,绑定mac,固定ip怎样解决,如果mac用克隆的话,ip用静态接
入的话,在电脑上认证的时候认证数据包记录的是电脑被dhap�
��配的地址还是wan口的路由器地址?我这个地方有疑问。还有
一个地方时心跳包机制,我对其他的不了解,就拿锐捷而言��
�每30秒都会有软件与服务器的通信,这种通信如果加入路由��
�的话会影响吗?
我是根据我们学校的情况咨询了一些问题,肯请课题组给予��
�答

Original issue reported on code.google.com by [email protected] on 3 Aug 2011 at 7:03

napt66里1.0和1.1固件路由下子网均不能访问外网

我用的RG100A 
64M,刷了这两个固件,但是很奇怪,如果只填ipv4的相关信息�
��路由下子网的电脑均不能连上外网,ssh进入路由能ping通ipv4�
��网。无论填不填写ipv6地址和网关,子网和路由均不能ping通i
pv6站点。请问这是怎么回事。学校的网络环境是静态ipv4,MAC�
��ip及宿舍绑定;ipv6地址和网关全是自动分配。


邮箱[email protected] QQ 1650702280 如果方便的话还是加QQ聊吧

Original issue reported on code.google.com by [email protected] on 13 Jun 2011 at 4:03

300r路由器(ar71xx)下集成napt66的固件,有问题

问题一
network.config不能更新到路由器的network里,按照教程弄得,但��
�编译好的固件刷完,network,内容没有改变

问题二
wan不能自动获得ipv6地址,控制台ping6 ipv6.google.com 
显示不支持的协议

问题三
radvd没有起作用,win7电脑本地连接没有自动获得ipv6地址

问题四
没有无线

补充:我的另一个路由器rg100a 刷1.0版本什么问题也没有;
          300r,刷完固件,ipv4没有问题,能正常上网

以下是我编译固件时修改的所有文件,应该是有些改错了,la
n是eth0,wan是eth1   

Original issue reported on code.google.com by [email protected] on 1 Oct 2011 at 8:20

Attachments:

New patch about linux-2.6.37.6-ccs-1.8.1

I have rewrite this fuction,and now it  can work on linux-2.6.37.6.
But I cann't write a patch ,I show this function.


int get_ip6_by_name(char* if_name,struct in6_addr* p_ipv6)
{
    struct net_device *dev;
    struct net *net = NULL;
    struct socket *sock;
    struct inet6_dev *in_dev6;
    struct inet6_ifaddr *ifa6 = NULL;
    struct list_head* list_head_ipv6 = NULL;
    struct inet6_dev* inet6_dev_ipv6=NULL;
    struct list_head* temp;
    sock_create_kern(PF_INET6, SOCK_DGRAM, 0,&sock);
    net = sock_net((const struct sock *)sock->sk);
    dev = dev_get_by_name(net,if_name);

    in_dev6 = (struct inet6_dev *)dev->ip6_ptr;

/*  while (in_dev6){
        ifa6 = in_dev6->addr_list;
      while (ifa6){         
            if(ifa6->scope == IPV6_ADDR_ANY){   
                (*p_ipv6) = ifa6->addr;//addr即为eth0接口的v6地址
                dev_put(dev); 
                return 1;
            }
         ifa6 = ifa6->if_next;
        }      
        in_dev6 = in_dev6->next;*//////
//}
    while (in_dev6){
        temp=&(in_dev6->addr_list);
        list_for_each(list_head_ipv6,temp)
        {
            ifa6=list_entry(list_head_ipv6,struct inet6_ifaddr,if_list);
            if(ifa6)
                if(ifa6->scope == IPV6_ADDR_ANY){
                    (*p_ipv6) = ifa6->addr;//addr即为eth0接口的v6地址
                    dev_put(dev);
                    return 1;
                }
        }
    in_dev6 = in_dev6->next;
    }

    dev_put(dev);  
    return 0;
}

Original issue reported on code.google.com by [email protected] on 22 Jun 2011 at 6:08

我把/etc/rc.local的最后两行注释掉了

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 20 Apr 2011 at 10:13

使用GoogleCode的代码库服务进行代码版本控制

今天把NAPT66模块的v1.0源码通过SVN传到服务器了,版本号r13。

SVN的使用方法可以查看google的文档,也可以参考下面这篇文��
�:

http://saw-unix.com/2010/07/linux_google_code_subversion.html

Original issue reported on code.google.com by [email protected] on 18 Mar 2011 at 9:38

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.