基于Linux包过滤防火墙的研究与实现
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
随着计算机网络的飞速发展,网络安全越来越被人们所认识和重视,在维护网络正常运行方面越来越起到举足轻重之作用,已成为当代信息社会的一个重要特征。在众多安全措施中,防火墙首当其中。本论文即从阐述防火墙对网络安全的必要性入手,引导课题的开展,并就网络安全方面,给出网络攻击的相关历史事件。
     本文起笔介绍了防火墙发展的历史概要,并就防火墙目前的发展状况提出其发展前景。文章以网络安全为中心,考虑网络的各个层面,整体把握网络在应用中的安全性。在构造防火墙的过程中,阐述进行设计防火墙的大部分概念和重要理论依据。介绍TCP/IP(传输控制协议/网际协议)协议以及防火墙常用的IP消息类型TCP(传输控制协议)、UDP(用户数据报协议)、ICMP(网际控制报文协议)及其在网络传输中的作用、介绍数据输出包、数据输入包的概念及其基于防火墙中的思想。
     从防火墙设计的逻辑关系来看,文中总体把握包过滤防火墙的思想,深入细致地介绍了网络会话的细节,基于输入包和输出包的过滤思想,如何有选择性地开放Internet公共服务三方面重要的内容,并提供相关实例。文章在介绍相关安全防御的同时对于常见的黑客攻击原理也做了说明,包括TCP SYN湮没攻击、Ping湮没攻击、UDP湮没攻击等。
     在防火墙实现上,本文是基于Redhat Linux操作系统,主要用Linux2.4内核中ipchains构造不同网络拓朴结构的防火墙。文中对防火墙工具ipchains及其参数进行了详细的说明与描述,给出了具体的数据包过滤流程。从对防火墙机器的具体设置说起,介绍不同的网络体系结构并利用防火墙设计工具ipchains针对其各自设计,阐述防火墙设计的两种安全策略:默认禁止一切和默认接受一切,并对其进行相互的比较,给出相关的脚本语言。文中针对单系统、堡垒防火墙屏蔽子网、带DMZ(非军事化区)防御带三种不同网络拓扑结构加以说明,阐述NAT(网络地址转换)的原理和DMZ工作原理以及它们的相应网络拓扑结构。同时给出基于DNS服务的相关脚本。
     本文主要针对中小型网络而设计基于Linux操作系统的包过滤防火墙,旨在保护其网络安全并节俭网络费用,为此实现NAT共享IP,屏蔽保护子网共享防火墙外网真实IP,达到伪装保护且节俭网络费用之功效,从而减轻网络负担;构造DMZ,将保护子网与网络服务器分离,有效地解决服务器提供网络服务与子网安全保护这一对矛盾,从而规划有效的防火墙设计适应更加复杂的安全策略。
    
     本论文设计的包过滤防火墙体系兼结构简单、针对性强、投入费用少等特点,同时
    为中小型企业构建和维护防火墙提供了相关的理论依据和参考。
With the fast development of computer network on kinds of business, network security is attached great importance to by more and more people. It plays a more significant role in maintaining the normal network working, and has become an important characteristic of the contemporary information society. Among many ways, firewall is the most effectual one. Some examples about network attack are presented firstly.
    Above all, this paper discusses the summary on historical development of firewall and presents its perspective on this. It considers the every application facets for the entire network, focuses on center of network security . It describes the most important conceptions and minds in designing firewall .At the same time, it also introduces what is input packet, output packet, their ideas based on firewall as well.
    From the logic of setting up firewall , the article introduces three significant contents which are the details of network dialogues, ideas on input packet and output packet and how to open the public Internet services with selecting, with some examples. At the same time, it also explains the theories on hacker attack as usual, including TCP SYN Flooding, Ping Flooding and UDP Flooding and so on.
    In the implementation of firewall, the designer takes advantage of ipchains which is based on Redhat Linux operation system, Linux 2.4 kernels to construct firewall under kinds of network torpo structure. The paper also describes and explains firewall tool, ipchains and its correlative parameters in detail, and elaborates packet filter process as well. Before setting up firewall, it introduces different kinds of torpo architectures with ipchains, tool to design firewall. There are two policies to design firewall, default deny and default accept. They are compared with some correlative scripts. Furthermore, this paper introduces three different network architectures which are Single system, Bastion firewall screening subnet and the net work with DMZ (demilitarized Zone)
    
    
    defending network, elaboratess theories of NAT (Network address translation) and DMZ(Demilitarized Zone), with the practical examples based on DNS(Domain Name Service).
    In practical, this paper describes how to design filter firewall based on Linux operating system for medium-sized enterprises to protect their network security and save their expense. It can screen the defended subnet and share one real IP with all computers in subnet by NAT. ON the other hand, it can resolve the conflict between providing network services and protecting subnet so that the efficiency firewall is set up to fit for the more complex security policy.
    The filter firewall researched on this paper has many advantages, such as simple structure, strong focalization and lower expense and so on. It can provides theoretical basis and reference on constructing and maintaining a small-scale network.
引文
[1] http://www.hanweb.com/service/showthread.php?fdColumnld=49&threadid=25
    [2] 罗晓广 增钟建等 Linux网络应用教程[M] 电子工业出版社2000
    [3] Maraus Gonealves 防火墙技术指南[M] 孔秋林等译机械工业出版社 2000
    [4] 刘占全 网络管理与防火墙技术[M] 中国电力出版社 2000
    [5] http://www.pcworld.com.cn/2001/back_issues/2123/2332b.asp
    [6] Terry William Ogletree 防火墙原理与实施[M](第1版)李之棠等译 2000
    [7] 黄允聪 严望佳 防火墙的选型、配置、安装和维护[M] 清华大学出版社1999
    [8] 李蔚泽 编著Red Hat Linux 7.2系统管理[M] 清华大学出版社2001
    [9] 杜炜 新概念Linux教程(第1版)[M] 北京科海集团公司出版社2001
    [10] Tim Park TCP/IP技术大全[M](第1版)前导工作室译机械工业出版 2000
    [11] Richard W.Stevens TCP/IP详解[M] 协议 王刚等译 北京大学出版社1999
    [12] D.Comer Internetworking with TCP/IP[M].Vol.Ⅰ(3rd Ed.) Prentice-Hall 1997
    [13] D.Comer.Computer Networks and Internets[M].Prentice-Hall 1997
    [14] Robert L.Ziegler 著 Linux防火墙[M] 余青霓等译 人民邮电出版社2000
    [15] 卢津榕 冯宝坤等 解读黑客——黑客是怎样炼成的[M] 北京希望电子出版社 2001
    [16] Chris Hare & Karanjit Siyan. Internet防火墙与网络安全[M] 刘成勇等译机械工业出版社 1998
    [17] 宁磊 周卫编著 Linux网络与安全管理[M] 人民邮电出版社2001
    [18] William R.Cheswick Steven M.Bcllovin 防火墙与因特网安全[M] 机械工业出版社 2000
    [19] Karanjit S,Chris H.Internet Firewalls and Network Security[M],USA:NewRiders Publishing,1995
    [20] Luotoren A,Altis K.World-wide Web proxies.Computer Networks and ISDN Systems,1994
    [21] 张小斌 黑客分析与防范技术[M](第1版清华大学出版社 1999
    [22] 徐伟建 严忠军等 防守反击黑客手段与防范[M](第1版)人民邮电出版社 2001
    [23] 王华 Linux编程与网络应用[M] 冶金工业出版社 2000
    
    
    [24] 张银福 陈曙晖等 Linux网络应用技术[M](第1版) 机械工业出版社 1999
    [25] 冯锐 Linux内核源代码分析[M](第1版) 机械工业出版社2000
    [26] 贾明 严世贤 Linux下的C编程[M](第1版) 人民邮电出版社1998
    [27] 郑沛峰 谢瑞和 基于Linux 实现局域网共IP访问Intemet计算机工程与应用[J] (第38卷第六期) 2002年6月 169~171
    [28] 曹汉平 冯启明等 Linux 防火墙技术研究 武汉理工大学学报[J](第26卷第1期) 2002年2月 120~122
    [29] 张晶 刘绍中 uGuardian 防火墙设计及实现 计算机应用[J](第20卷第6期)2000年6月 76~78
    [30] 徐辉 潘爱民等 Linux 防火墙的原理与实现[J] 计算机应用[J](第22卷第1期)2002年1月 20~23
    [31] 刘渊 乐红兵等 因特网防火墙技术[M] 机械工业出版社 1998
    [32] 马晓先 昭谦谦 组建Linux服务器[M](第1版) 人民邮电出版社2001
    [33] 姚继锋 尹欣等编著 Linux应用实例与技巧[M] 机械工业出版社2001
    [34] 王智民 鲁芹 编著 Red Hat Linux 7.0实战技术[M] 国防工业出版社2001
    [35] http://www.linuxaid.com
    [36] http://www.redhat.com
    [37] http://www.linuxforum.net
    [38] http://www.linuxdoc.org
    [39] http://it.rising.com.cn/safety/subject/firewall/firewall.htm
    [40] 李有忠 张新有等编著 计算机网络应用与实验教程[M] 电子工业出版社 2001
    [41] 谢希仁 计算机网络[M](第2版) 电子工业出版社 1999
    [42] 张公忠 现代网络技术教程[M] 电子工业出版社 2000
    [43] 张水平 张风琴等 计算机网络及应用[M] 西安交通大学出版社 2002
    [44] A.S.Tanenb aum Computer Networks(3rd Ed.)[M] Prentice-Hall 1996
    [45] Tang S S.Scoggins.Open Networking With OSI[M].Prentice-Hall 1992
    [46] Craig Zacker著 TCP/IP 网络管理[M] 王晓东等译 中国水利水电出版社
    [47] Douglas E.Comer & DavidL.Steveas用TCP/IP进行网际互连[M] (第3版) 赵刚等译 电子工业出版社1998
    
    
    [48] 胡道元 计算机局域网[M](第2版) 清华大学出版社1996
    [49] http ://www. neweasier, com/article.html? class=12