Research,Development and Realization of the Packet Filter Network Firewall Based on Linux Kernel

Author
MaChenChen
Advisor
ZhangWeiShi
School
Dalian Maritime University
Major
Computer Science and Technology
Classification
TP393.08 Computer Network Security
Degree
Master's thesis
Year
2012
Downloads
73
Citations
0

Request the full text

Abstract

Over the last few decades Internet has increased so widely and reached many corners of our homes. Everyday more and more devices are getting connected to Internet. With this widespread use of networks and rapid growth of information between the network transmissions, network security became a major concern of all. Because of increased illegal cyber-attacks of various means, many Internet users feel themselves so vulnerable. Such challenges motivate me to conduct a research and build Network Firewall system. Firewall is a security mechanism that allows limited access to a computer or a network from unauthorized network, allowing only approved traffic in and out according to a predefined thought-out plan. This includes selecting the services appropriate to business needs and barring others that may have significant security holes. While home users protect themselves using end point firewalls that are installed on their computers, business users like companies are obliged to use network firewalls that not only control incoming network traffic but also manage internal traffic. Although the hackers so rampant, but the network security issues are still not able to attach adequate importance, many users consider that the network security issues far from their own. Most of hacking attacks occur mainly due to not correct installation of the firewall. Firewall technology can be divided into four basic types:packet-filtering, network address translation, agent-based and monitoring. My system is the type of packet filtering firewall. Packet filtering technology has the advantage of simple, low cost, relatively simple applications and to a certain extent guarantee the security of the system. This research presents analysis of open source solutions for routing and filtering regular network traffic.In this Thesis work I have done an extensive research on Network Firewall System and finally developed and implemented a Network Firewall System named DMU Network Firewall System based on CentOS Linux Kernel. One mechanism to provide enhanced security for a network is to filter out potentially malicious network packets. Firewalls are designed to provide "policy-based" network filtering. The firewall treats packets leaving, entering, or passing through computer. Basically there is a separate Chain for each of these. Any packet entering the computer goes through the INPUT chain. Any packet that the computer sends out to the network goes through the OUTPUT chain. Any packet that the computer picks up on one network and sends to another goes through the FORWARD chain. The main goal of this project is to develop open source firewall based on Linux. Also I used few applications like PHP, MySQL Database to build up web based graphical interface for user friendly easy administration. This Firewall is functional in a real environment and can be accessed through a user friendly popular Browsers like Internet Explorer or Firefox to manage the Firewall rules.

Table of contents

Summary 5-6 ABSTRACT 6-11 Introduction 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 <br / > 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 <br / > 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 References 95-101 Acknowledgements Acknowledgements 101

Related dissertations

  1. Research of Forwarding Performance Based on IP and Vector
    HaoZuoGang ·Beijing Jiaotong University ·2011 ·Master's thesis
  2. Multi-box Clusters in the Router IP Forwarding Test Research and Implementation
    PengSha ·Hunan University ·2010 ·Master's thesis
  3. IP forwarding based on multi-core network processor System Design and Implementation