1 / 62
文档名称:

NAT网关porttriggering功能设计与实现.pdf

格式:pdf   页数:62
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

NAT网关porttriggering功能设计与实现.pdf

上传人:coconut 2014/2/20 文件大小:0 KB

下载得到文件列表

NAT网关porttriggering功能设计与实现.pdf

文档介绍

文档介绍:华中科技大学
硕士学位论文
NAT网关porttriggering功能设计与实现
姓名:代兵
申请学位级别:硕士
专业:软件工程
指导教师:刘小峰
2010-11-01
华中科技大学硕士学位论文
摘要
为了解决 IPv4 地址空间匮乏和局域网安全等问题,采用基于 NAT(网络地址转
换)方式的 ADSL 路由器上网方式是目前中小型办公室和家庭用户连接互联网的最
主流接入方式。而 Linux 系统是一个免费的开源操作系统,并且由于其内核易于扩
展和裁减,高效率等诸多优点,大部分的 NAT 应用网关等嵌入式系统采用 Linux 内
核作为其核心。
虽然采用 NAT 连网方式在一定程度上解决了 IP 址址不足和增加了局域网的安全
性,但这种方式也给隐藏在 NAT 网关背后的主机在某些软件的使用上带来一些问题。
因为在这种情况下内网与外网进行通信时只能由内部主机主动发起,外网主机是无
法主动与内网主机进行通信的。
例如在使用 IRC 通信软件时,NAT 网关后的 IRC 客户端首先会通过 TCP 连接外
网 IRC 服务器的 6667 端口,来完成用户账号的确认,之后服务器收到请求后会主动
发去连接客户端的 113 号端口进行数据通信。但这 NAT 方式下,服务器发给客户端
113 端口的数据包是无法穿越 NAT 网关到达客户端的。
本文在基于 版本内核的 NAT 网关上设计和实现了一种解决方案——即
Port triggering 内核模块。主要原理是基于 Linux FILTER 框架的钩子函数
和 CONNTRACK 模块进行数据包流动的探测,然后再利用 NAT 模块来实现外网数
据包穿越 NAT 网关到达内网的功能。这种实现方式相比现行的作法不仅在实现上更
为简洁,而且当内网发给外网的数据包后一定的时间段内,如果外网主机还未连接
内网主机的另一端口,那么该期待的反向连接将会被关闭,从而保护内网的安全。

关键词:家庭网关 Linux内核网络地址转换端口触发
I
华中科技大学硕士学位论文
Abstract
To solve the problems of shortage in IPv4 address space and enhancement in
LAN security, a methond was adopted in ADSL routers to connect to the for most
of the small office and home users. The method based on the work address
translation) mode. The Linux system is a free open source operating system, and also for
the easiness to extend and reduction in the kernel, high efficiency and many other
advantages, so most embedded systems, such as NAT Gateway, is based Linux Kernel .
Althought the method of adopting NAT mode work gateway solved the shortage
of IPv4 addresses and also increased LAN security to some certain degree, at the same
time the method also bring some problems to the puter which hidden behind the
NAT Gateway, and some software in the Lan hosts which behind the NAT routers will not
work very well, because in this way munication between the work and
local Lan hosts can only be initiated by the internal host, and the work host
is unable to take the initiative municate with the host in the work.
For example, when using