基于Linux内核包过滤网络防火墙的研究与实现

作者
马晨晨
导师
ZhangWeiShi
学校
大连海事大学
专业
计算机科学与技术
分类号
TP393.08 计算机网络安全
学位
硕士学位论文
年份
2012
下载次数
73
被引次数
0

摘要

过去的几十年里,发展快速的因特网已经走进千家万户。每天越来越多的设备接入到因特网中。随着网络使用的快速普及和网络间信息交互的快速增长,网络安全成为大家关注的目标。许多因特网用户遭到来自网络的各种各样的攻击。建立网络防火墙是保护网络安全的有效手段。网络防火墙可以保护计算机或者网络有限制的访问没有授权的网络,从而使数据流按照预先定义的方式流通。这包括选择合适的商业服务需求阻止安全漏洞。当终端用户使用防火墙保护他们电脑的时候,商业用户使用防火墙不仅保护自己的网络免受攻击,同时也管理自己的内部网络数据。尽管黑客猖獗,但是网络安全问题没有得到应有的重视,许多用户认为网络安全问题离自己很远。许多黑客的攻击是因为没有正确安装防火墙所致。该系统是基于包过滤技术的防火墙系统,IP包过滤技术具有过滤路由器速度快、效率高、应用简单和易于扩展等优点,本文分析了开源路由器和过滤器的解决方案。本文扩展了网络防火墙系统,开发并实现了基于Linux内核的DMU网络防火墙系统。为了增强网络的安全性,我们提供的一个机制是过滤网络潜在的恶意信息包。防火墙设计是基于策略的过滤设计,防火墙将处理所有离开,进入和经过电脑的数据包,每一种包都有自己的数据链。所有进入电脑的包都经过输入和输出链。防火墙用于收集关于系统和网络使用和误用的信息。作为访问的唯一点,防火墙能在被保护的网络和外部网络之间进行记录。它执行站点的安全策略,仅仅容许“认可的”和符合规则的请求通过。进出的信息都必须通过防火墙,防火墙成为网络安全问题的检查点,使可疑的访问被拒绝于门外。此系统主要目标是开发基于Linux的开源防火墙,应用PHP、MySQL构建基于图形接口的网络,部署于真实的网络环境中运行,该防火墙具有友好Web用户界面,客户端应用浏览器来登录防火墙,实现管理防火墙的功能。利用这个基于Web的GUI接口,我们可以添加/删除IP表格规则,控制某些源地址或源端口的流量。

目录

摘要 5-6 ABSTRACT 6-11 引言 FORWARDS 11-12 Chapter 1:Introduction 12-14 1.1 Motivation 12 1.2 Problem to be solved 12 1.3 Contribution and accomplishment 12 1.4 Organization of the thesis 12-13 1.5 SubjectSources and related info 13 1.6 Benefits and target users 13-14 Chapter 2:Research Background and related analysis 14-36 2.1 Technical Design and Implementation of the program 14-17 2.1.1 IPTables 14-16 2.1.2 MYSQL 16 2.1.3 PHP(PHP:Hypertext Preprocessor) 16-17 2.2 Research Present Situation at home and abroad 17 2.3 Computer Viruses 17-18 2.3.1 Non-resident viruses 17 2.3.2 Resident viruses 17-18 2.4 Instances of attacks occurred in the past 18-23 2.4.1 Distributed SYN flood attack 18-19 2.4.2 Distributed ICMP flood and smurfattack 19-20 2.4.3 Application-level floods 20 2.4.4 Direct DDoS Attack 20-21 2.4.5 Reflector DDoS Attack 21-22 2.4.6 Peer-to-peer attacks 22-23 2.4.7 Teardrop attacks 23 2.4.8 IP Spoofing Attack 23 2.5 Comparison of 2010 and 2011 Cost of attacks 23-24 2.6 Prevention and Countermeasure responses 24-27 2.7 Defenses in Practice 27-28 2.8 Research Status at home and abroad 28-32 2.9 Firewall Benefits and kinds 32-33 2.9.1 Advantages of Software Firewalls 32-33 2.9.2 Disadvantages of softwre firewalls 33 2.9.3 Advantages of hardware firewalls over software firewall 33 2.9.4 Disadvantage of hardware firewalls 33 2.10 Comparison of open source versus commercial firewalls 33 2.11 Benefits of Linux based Software Firewall 33-34 2.12 The Future of Firewall 34-36 2.12.1 Firewall Marketgrowth Projection 35-36 Chapter 3:Key Technologies Concept 36-45 3.1 Network Firewall Concept 36-37 3.2 Key commonly used technology concepts 37-43 3.2.1 Network Firewall 37-38 3.2.2 Packet Filtering 38 3.2.3 NAT 38-39 3.2.4 DNAT 39 3.2.5 PAT 39 3.2.6 Port Mapping 39 3.2.7 DHCP 39-40 3.2.8 DNS and DDNS(Dynamic) 40-41 3.2.9 PPPoE 41 3.2.10 Port Mappingand Port Forwarding 41-43 3.3 ARP Spoofing 43 3.4 Real Time Alarming 43 3.5 Log Management 43-45 Chapter 4:Firewall System Analysis 45-54 4.1 System Development Environment 45 4.2 System Structure Overview 45-46 4.3 Function of the Chains 46 4.3.1 INPUT mode 46 4.3.2 OUTPUT mode 46 4.3.3 Manage Mode 46 4.4 Firewall Different Target meaning 46-47 4.4.1 ACCEPT Target 46 4.4.2 DROP Target 46 4.4.3 REJECT 46-47 4.5 IPTables Packet flow 47 4.6 Linux Kernel concept 47-50 4.6.1 Introduction to Linux Kernel 47-48 4.6.2 Majorsubsystems and Overview of the Linux kernet 48-50 4.7 Linux Kernel Installation 50-54 4.7.1 Build preparations 50 4.7.2 Configuring the kernel 50-51 4.7.3 The kernel ABI 51 4.7.4 Modifying the kernel specification file 51-52 4.7.5 Building the new kernel 52-54 Chapter 5:Firewall System Design 54-61 5.1 Software Design Principle 54-58 5.1.1 Open-Closed Principle(OCP) 54 5.1.2 Liskov Substitution Principle(LSP) 54-55 5.1.3 Dependency Inversion Principle(DIP) 55-56 5.1.4 Interface Segregation Principle(ISP) 56 5.1.5 Single Responsibility Principle 56-58 5.2 System Architecture Overview 58-59 5.3 Input Mode 59 5.4 Output Mode 59 5.5 Manage Mode 59 5.6 Online Help 59 5.7 Database Connection 59-61 Chapter 6:Firewall System Implementation 61-85 6.1 Install Necessary Services 61-62 6.1.1 Install httpd 61 6.1.2 Install mysqld 61-62 6.1.3 Install php 62 6.2 Verify services installation 62 6.3 Access Firewall by Browser 62-65 6.3.1 Authentication required 63 6.3.2 Login screen codes 63-64 6.3.3 Incorrect login screen 64-65 6.4 Main Interface 65-68 6.5 Manage Mode 68-69 6.6 Input/Internal Mode 69-73 6.7 External Mode 73-77 6.8 TOS Flagging 77-80 6.9 TOS flag Type of Service 80 6.10 System Control and Health Checkup 80-82 6.11 Firewall Illegal Login tracking 82-84 6.12 Exit or Logout from Firewall 84-85 Chapter 7:Firewall System Testing and Troubleshooting 85-94 7.1 Checking Service Status 85 7.2 Flush-out IPTables 85-86 7.3 Various System Testing Scenarios 86-88 7.3.1 BIocklCMP protocol ping echo response 86 7.3.2 Reject FTP protocol port(21) 86-87 7.3.3 More specific policy settings/scenarios 87-88 7.4 Firewall System Troubleshooting 88 7.5 Checking the Firewall Logs 88-89 7.6 IPtables Would not Start 89-90 7.7 Linux Log Analyses 90-93 7.7.1 HTTP Logs 90-91 7.7.2 HTTP access logs 91-92 7.7.3 Secure Log 92-93 7.8 System Monitoring 93-94 Chapter 8:Conclusion 94-95 8.1 Summary of the thesis 94 8.2 Future Research Directions 94 8.3 Final Thoughts 94-95 References参考文献 95-101 Acknowledgements致谢 101

相关论文

  1. IP转发和向量转发性能研究
    郝毓刚 ·北京交通大学 ·2011 ·硕士学位论文
  2. 路由器多框集群中IP转发测试技术的研究与实现
    彭莎 ·湖南大学 ·2010 ·硕士学位论文
  3. 基于多核网络处理器的IP转发系统的设计与实现
    廖杨 ·电子科技大学 ·2010 ·硕士学位论文