基于Linux系统的包过滤防火墙

进修社 人气:1.34W
毕业论文

基于Linux系统的包过滤防火墙
 
摘 要:随着21世纪的到来,Internet的迅速发展给现代人的生产和生活都带来了前所未有的飞跃,大大提高了工作效率,丰富了人们的生活,弥补了人们的精神空缺;而与此同时给人们带来了1个日益严峻的问题——网络安全。在众多的网络安全防范手段中,防火墙有着价格低廉、适用性强、操作相对简单等特点,因此得到了众多受众的喜爱。本文从网络安全这1课题入手,逐步深入,论述了在Linux系统上实现包过滤防火墙的过程。
本文的第1章主要是对当今网络的发展和网络安全的现状进行了描述和分析;第2章主要对网络中常用的4种攻击模式进行了分析和比较,它们分别是:服务拒绝攻击、利用型攻击、信息收集型攻击、假消息攻击;本文的第3章综合介绍分析现今常用的防火墙的6种模式,他们分别是:包过滤防火墙、状态/动态检测防火墙、应用程序代理防火墙、NAT设置防火墙、个人防火墙,其中重点介绍了包过滤防火墙,并详细分析其优缺点;第4章着重介绍Linux内核模块编程及其防火墙架构Netfilter;第5章,本文介绍开发1个简单的'包过滤防火墙的过程。
最后,第6章本文对整个设计以及网络安全和包过滤防火墙的特点进行了1个总结。
关键词:网络安全;网络攻击;防火墙;Netfilter;钩子函数
 
Packet Filtering Firewall On The Linux System
 
Abstract:Along with the advent of 21 century, the internet’s flying development brings us unimaginable advancement on life style and industry. It not only improves on our work efficiency, but also enriches peoples life. It’s becoming more and more important for us. Whereas internet’s development also brings us a progressively problem called the safety of network. In numerous of modes to keep away from network attacks, firewall depends on its logical price, strong applicability and wieldy handle win a lots of people’s favor. This thesis started with network safety, and discussed how to design a packet filtering firewall on Linux system.
 In content, this thesis includes six parts. At the chapter 1 of the thesis, it depicted and analysed the actuality of network safety in China. At the next chapter it compared and analysed four models of network attacks nowadays. On chapter 3, it introduced six models of firewall ,afterward, it detailed introduced the elements of paket filtering firewall and analysed its excellences and disadvantages. Chapter 4 is to introduce Linux kernel and Netfilter which is the basic on theoretics to design a packet filtering firewall on Linux system. And the chapter 5 is to introduce the processes of designing a filewall.
Finally, it carried the summary of the whole thesis.
Keyword: The network safety The network attacks  Firewall  Netfilter  Hook
目  录
前   言 1
1 网络安全概述 2
1.1 何谓网络安全 2
1.2 我国网络安全现状 2
1.3 网络安全问题的解决办法 4
1.4 本章小结 5
2 网络攻击模式简介 6
2.1 服务拒绝攻击 6
2.2 利用型攻击 8
2.3 信息收集型攻击 9
2.4 假消息攻击 10
2.5 本章小结 10
3 防火墙模式及分析 11
3.1 包过滤防火墙 11
3.2 状态/动态防火墙 13
3.3 应用程序代理防火墙 15
3.4 NAT 15
3.5 个人防火墙 16
3.6 本章小结 17
4 Linux内核模块编程及Netfilter 18
4.1 Linux内核模块和驱动的编写 18
4.2 Netfilter及其HOOK函数简介 23
4.3 利用Netfilter实现Linux内核防火墙 27
5 详细设计 33
5.1 开发系统概述 33
5.2、主要算法描述 34
5.3遇到的问题及解决方法 35
5.4 源程序、注解及用户手册 36
6 结束语 37
参考文献 38
致  谢 39
附录1:源程序及其注解 40
附录2:用户手册 60

基于Linux系统的包过滤防火墙

前   言
防火墙作为1种网络或系统之间强制实行访问控制的机制,是确保网络安全的重要手段。如果用户能根据自己的实际需要,将防火墙设计的1般理论和方法与自己系统的具体实践相结合,设计1些小而精、精而强的防火墙程序,则往往可以发挥出比花大价钱买来的通用型防火墙更好的作用。
由于篇幅限制,本文仅以Linux系统为例,介绍了1个运用Netfilter技术的简单包过滤防火墙的设计与实现。
该防火墙的设计与实现是基于Linux 2.4内核的1个子系统——Netfilter,运用其提供的HOOK函数接口连接内核的方法来实现。Netfilter子系统能使诸如数据包过滤、网络地址转换(NAT)以及网络连接跟踪等技巧成为可能,这些功能仅需通过使用内核网络代码提供的各式各样的HOOK既可以完成。通过Netfilter设计的该防火墙,具有简洁有效、代码精简等优点,并且不要求用户对Linux内核拥有专家级的了解。