龙源期刊网 http://www.qikan.com.cn 基于iptables的透明网关模式在网闸中的设计与实现 作者:辛海涛 来源:《电脑知识与技术》2011年第08期 摘要:该文叙述了基于netfilter/iptables的透明网关模式在网闸中的设计与实现。介绍了网闸的工作原理、netfilter和iptables的包过滤filter、网络地址转换(NAT、数据包处理mangle等的功能框架以及透明网关的工作原理,最后我们给出了所设计的透明网关的详细的工作流程,并给出了在网闸上的具体实现。 关键词:网闸;透明网关;netfilter;iptables;NAT 中图分类号:TP393文献标识码:A文章编号:1009-3044(201108-1764-03 The Design and Implementation of Transparent Gateway Based on Iptables in the GAP XIN Hai-tao (Wuhan University of Technology, Wuhan 430063, China Abstract: This article presents the design and implementation of transparent gateway base on iptables in the GAP. Describes the working principle of the gap, gives the packet filtering, network address transition and packet processing of the netfilter and iptables framework, and also gives the detail running process of transparent gateway, and finally we give the detailed design of the transparent gateway, and gives the concrete implementation in the gap. Key words: gap; transparent gateway; netfilter; iptables; NAT 随着网络技术的成熟和应用的不断完善,Internet 正在越来越多地融入到社会的各个方面。一方面,电子政务、企业上网、电子商务等一系列网络应用蓬勃发展,人们的日常生活与网络的关系日益密切;另一方面,网络用户成分越来越多样化,出于各种目的的网络入侵和攻击越来越频繁。人们在享受互联网所带来的丰富、便捷的信息同时,也日益感受到频繁的网络攻击、病毒泛滥、非授权访问、信息泄密等问题所带来的困扰。 网闸在电子政务、企业上网等行业使用的越来越普遍,能做到真正的物理隔离,然而为一个局域网安装网闸时,有可能需要更改局域网中的服务器和客户端的配置,或者需要更改网络应用程序的设置,甚至需要更改网络拓扑结构。为了使这样的改变尽可能少,人们希望网闸具有“透明性”,使得它的存在不引起用户过多的感觉。 1 网闸技术的工作原理