With the rapid development of information technology,container technology,cloud technology,and network infrastructure have been widely used and greatly improved.However,with the rapid development of the Internet,network attack methods and forms are also constantly upgrading and evolving,and network security has become an important issue in the development of the global Internet.The emergence of new network threats,continuous network scanning behavior,and increasing network traffic are all posing unprecedented challenges to network security.As an important component of network security,firewall technology is also facing new challenges.Therefore,higher packet processing efficiency and operating speed are particularly important for firewalls.This thesis proposes a high-performance firewall technology solution based on eBPF(extended Berkeley Packet Filter)and XDP(eXpress Data Path)technology,which implements a high-speed firewall packet processing method and uses machine learning to identify scanning behavior to further reduce resource consumption.In the section on firewall packet filtering and communication methods,this thesis designs an efficient network packet analysis method based on eBPF technology and optimizes the data transmission method to improve the processing ability of data packets.Through packet structure analysis and extraction methods,the contents of network packets can be parsed and analyzed.By using the eBPF-based network packet analysis method and design,the firewall can quickly filter and process network packets,thereby improving network defense capabilities.This method was experimentally validated and demonstrated good reliability and performance.To achieve data transmission between kernel space and user space,this thesis designs multiple data structures and communication methods through the map mechanism to realize data sharing between kernel space and user space.This method has high efficiency and reliability,avoids the overhead of data copying and context switching,and has good concurrency and scalability,supporting multiple eBPF programs to access simultaneously and enabling complex data interaction.Finally,to achieve efficient and accurate scanning behavior detection and disposal,this thesis proposes a detection method based on short-term network flow characteristics and CART(Classification And Regression Tree)algorithm,which can accurately detect scanning behavior in the network and issue timely warnings and processing.When establishing the model,network flow and time window factors were considered,which further improves the accuracy and speed of scanning behavior detection,thereby improving the performance and reliability of the firewall.Based on the above methods,this thesis implements a high-performance firewall system and designs relevant testing and comparative experiments.The system’s effectiveness and performance improvement are verified through tcpreplay replay,scan attacks,and pktgen large traffic testing,as well as performance comparisons with iptables and other improved firewall systems in the literature. |