A flow data processing method and related device

By introducing an intelligent traffic filtering mechanism into network devices, identifying and excluding non-key video streams, and using the five-tuple filtering method of the Linux kernel, the problem of sharp increase in network traffic caused by video surveillance data is solved, and cost control and resource optimization are achieved Effect.

CN118764442BActive Publication Date: 2025-02-18HUNAN COMM RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411253997.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-02-18
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

In environments such as smart buildings and highways, due to the integration of a large amount of video surveillance data, network traffic has increased sharply, resulting in a significant upgrade in the hardware, software and scalability of network access control and data analysis devices, resulting in non-linear growth in costs. Facing huge investment in order to improve the marginal improvement of network defense capabilities.

Method used

Introduce an intelligent traffic filtering mechanism, by identifying and excluding non-critical video streams, adopting a five-tuple filtering method based on the Linux kernel, using ifb Linux kernel module and traffic control tools, queuing rules and filtering rules are configured, and hash tables are used to find matches and match. Traffic data that complies with the rules takes a discarding action, and copy unmatched data to the virtual interface and forward it to the security device.

Benefits of technology

Significantly reduce the burden on the device, avoid unnecessary performance upgrades, ensure that the analysis focuses on data packets related to security, improve analysis accuracy and efficiency, and achieve the dual goals of cost control and resource optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764442B_ABST
    Figure CN118764442B_ABST
Patent Text Reader

Abstract

This application discloses a traffic data processing method and related apparatus, including configuring the network interface eth1 of a mirrored traffic filtering device to promiscuous mode; identifying network traffic data, filtering out traffic data related to the RTSP protocol, and extracting parameters to form a five-tuple information; loading the ifb Linux kernel module to create a virtual network interface ifb0; deploying queuing rules on the eth1 interface using the traffic control tool of the ifb Linux kernel module, and configuring traffic control filtering rules based on the five-tuple information, with the hash table set for efficient lookup and matching; discarding traffic data that conforms to the traffic control filtering rules, and simultaneously setting up a mirroring operation to copy all traffic data that does not conform to the traffic control filtering rules to the ifb0 interface. This application can reduce the performance overhead caused by frequent back-and-forth switching between user space and kernel space in language development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data control technology, and specifically relates to a flow data processing method and related devices. Background Art

[0002] Switch mirror traffic technology is the cornerstone of enterprise network security management. Its core role is reflected in strengthening network terminal access control and deepening the effectiveness of security data analysis.

[0003] However, in environments such as smart buildings and highways, due to the integration of large amounts of video surveillance data, network traffic has increased dramatically, posing severe challenges to access control and data analysis devices. These devices need to be significantly upgraded in hardware, software, and scalability to maintain efficient operation, resulting in costs that increase nonlinearly or even exponentially with traffic growth, and companies face huge investments in order to achieve marginal improvements in network defense capabilities. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the present application provides a traffic data processing method and related devices to introduce an intelligent traffic filtering mechanism to specifically identify and exclude non-critical video streams, which can significantly reduce the burden on the device and avoid unnecessary performance upgrades. At the same time, it ensures that the analysis focus is concentrated on security-related data packets, improves analysis accuracy and efficiency, and ultimately achieves the dual goals of cost control and resource optimization.

[0005] In order to achieve the above objectives, this application adopts the following technical solutions:

[0006] A flow data processing method is used to filter network mirror flow based on a five-tuple of a Linux kernel, comprising:

[0007] Configure the network port eth1 of the mirrored traffic filter device to promiscuous mode to receive all passing network traffic;

[0008] Identify the network traffic data, filter out the traffic data related to the RTSP protocol, and extract parameters to form five-tuple information, wherein the parameters include a source IP address, a source port number, a target IP address, a target port number, and a data transmission layer protocol;

[0009] Load the ifb Linux kernel module and create a virtual network interface ifb0;

[0010] On the eth1 interface, the queuing rules are deployed using the flow control tool of the ifb Linux kernel module, and the flow control filtering rules are configured based on the five-tuple information, and the hash table is set to efficiently search and match to match the flow data that meets the flow control filtering rules;

[0011] And taking a discard action for the flow data that meets the flow control filtering rules, and setting a mirroring operation at the same time, copying all the flow data that does not meet the flow control filtering rules to the ifb0 interface.

[0012] Furthermore, it also includes:

[0013] On the ifb0 interface, set forwarding rules;

[0014] And based on the forwarding rule, the flow data that does not comply with the flow control filtering rule is forwarded to the network port of the security device.

[0015] Furthermore, the data of identifying the network traffic, filtering out the traffic data related to the RTSP protocol, and extracting parameters to form five-tuple information include:

[0016] Use libpcap to capture data of said network traffic;

[0017] For the data of the network traffic, access the protocol type field in the Ethernet header, and filter out IPv4 data for the IP protocol according to the protocol type field;

[0018] For the IPv4 data, parse the protocol field of the IP header, and filter out TCP data according to the protocol field as the TCP protocol;

[0019] And obtaining a TCP data segment starting point for the TCP data, filtering out RTSP data according to the TCP data segment starting point as the RTSP protocol, so as to obtain the flow data related to the RTSP protocol.

[0020] Further, the network traffic includes data whose destination is not the local machine;

[0021] The security equipment includes a network access control device and a network security analysis platform.

[0022] In addition, the present application also provides a traffic data processing device for filtering network mirror traffic based on a five-tuple of a Linux kernel, including:

[0023] A configuration module is used to configure the network port eth1 of the mirrored traffic filtering device to a promiscuous mode to receive all the network traffic passing through;

[0024] An analysis module is used to identify the data of the network traffic, filter out the traffic data related to the RTSP protocol, and extract parameters to form five-tuple information, wherein the parameters include a source IP address, a source port number, a target IP address, a target port number, and a data transmission layer protocol;

[0025] The interface creation module is used to load the ifb Linux kernel module and create a virtual network interface ifb0;

[0026] A matching module is used to deploy queuing rules on the eth1 interface using the flow control tool of the ifb Linux kernel module, and configure flow control filtering rules based on the five-tuple information, and the hash table is set to efficiently search and match to match the flow data that meets the flow control filtering rules;

[0027] And a discarding and mirroring module, which is used to take a discarding action on the flow data that meets the flow control filtering rules, and at the same time set a mirroring operation to copy all the flow data that does not meet the flow control filtering rules to the ifb0 interface.

[0028] Furthermore, all interface creation modules are also used to:

[0029] On the ifb0 interface, set forwarding rules;

[0030] And based on the forwarding rule, the flow data that does not comply with the flow control filtering rule is forwarded to the network port of the security device.

[0031] Furthermore, the analysis module is used to:

[0032] Use libpcap to capture data of said network traffic;

[0033] For the data of the network traffic, access the protocol type field in the Ethernet header, and filter out IPv4 data for the IP protocol according to the protocol type field;

[0034] For the IPv4 data, parse the protocol field of the IP header, and filter out TCP data according to the protocol field as the TCP protocol;

[0035] And obtaining a TCP data segment starting point for the TCP data, filtering out RTSP data according to the TCP data segment starting point as the RTSP protocol, so as to obtain the flow data related to the RTSP protocol.

[0036] Further, the network traffic includes data whose destination is not the local machine;

[0037] The security equipment includes a network access control device and a network security analysis platform.

[0038] In addition, the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-described method when executing the computer program.

[0039] In addition, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method described above is implemented.

[0040] Compared with the prior art, this application has the following advantages:

[0041] The present application provides a traffic data processing method and related devices, which can shorten the performance overhead caused by the frequent switching between user state and kernel state of data developed in high-level languages, greatly utilize hardware resources, realize higher bandwidth mirror traffic speed measurement, and meet the demand for filtering invalid traffic in mirror traffic in high-bandwidth scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application but do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1 A flow chart of the method of this application;

[0044] Figure 2 This is a structural diagram of the device of this application;

[0045] Figure 3 This is a device framework diagram of this application;

[0046] Figure 4 A test data table for the method and device of the present application;

[0047] Figure 5 A schematic diagram of the structure of the computer device of the present application;

[0048] Figure 6 This is a schematic diagram of the structure of another computer device of the present application. DETAILED DESCRIPTION

[0049] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0050] In the description of the present application, it should be understood that the orientation or positional relationship indicated by the terms and the like is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device, element, module, device, platform or device referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. The following description of the present application is only understood as a description of individual embodiments of the technical solution of the present application. Other embodiments are not reflected in the following description, but it does not mean that the present application excludes these other embodiments, and the technical solution of the present application is not limited to the specific implementation methods described below, and the scope of protection of the present application is not limited to only the specific implementation methods described below. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present application.

[0051] It should be noted that if the terms "first", "second", etc. appear in the specification and claims of the present application and the above-mentioned drawings, the description is only used to distinguish similar objects, and is not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0052] In some embodiments, Figure 1 As shown, the present application provides a traffic data processing method for filtering network mirror traffic based on a five-tuple of a Linux kernel, including:

[0053] S1: Configure the network port eth1 of the mirrored traffic filtering device to promiscuous mode to receive all passing network traffic;

[0054] Specifically, configure the data capture environment and set the network port eth1 of the mirror traffic filter device to promiscuous mode so that it can receive all the network traffic passing through, including data packets that are not destined for the local machine. This step involves connecting to the observation port of the network switch to ensure that the mirror traffic of the entire network segment can be captured. Subsequently, start the filtering program to start monitoring and capturing this data.

[0055] S2: Identify the data of the network traffic, filter out the traffic data related to the RTSP protocol, and extract parameters to form five-tuple information, wherein the parameters include a source IP address, a source port number, a target IP address, a target port number, and a data transmission layer protocol;

[0056] Specifically, intelligent traffic identification is implemented. During the operation of the filtering program, deep packet inspection is performed on the captured data stream, with special attention paid to the RTSP protocol features, from which RTSP-related traffic is identified. During the identification process, key data packet parameters are extracted, including source IP address, source port, destination IP address and destination port, to form five-tuple information, which provides a basis for subsequent traffic control.

[0057] S3: Load the ifb Linux kernel module and create a virtual network interface ifb0;

[0058] Specifically, in preparation for the IFB interface, in order to achieve more refined traffic control, the device loads the ifb Linux kernel module and creates a virtual network interface ifb0. This virtual interface is intended to be the target of traffic redirection, that is, to separate specific traffic from the physical interface for independent management and processing.

[0059] S4: on the eth1 interface, using the flow control tool of the ifb Linux kernel module to deploy queuing rules, and based on the five-tuple information, configuring flow control filtering rules, the hash table is set to efficiently search and match, so as to match the flow data that meets the flow control filtering rules;

[0060] Specifically, in order to implement traffic classification and control, the Linux kernel traffic control (tc) tool is used to deploy queue rules (qdisc) on the eth1 interface. Based on the five-tuple information of the RTSP traffic identified in step S2, the tcfilter policy is configured, and the hash table is set to efficiently search and match to ensure that these specific traffic can be accurately matched.

[0061] S5: A discard action is taken for the traffic data that meets the traffic control filtering rule, and a mirroring operation is set at the same time to copy all traffic data that does not meet the traffic control filtering rule to the ifb0 interface.

[0062] Specifically, the configuration takes a "drop" action for the matched traffic, and sets a mirror operation at the same time to copy all traffic that does not match the rules to the ifb0 interface.

[0063] In some embodiments, it also includes:

[0064] On the ifb0 interface, set forwarding rules;

[0065] Specifically, we build a traffic forwarding link. On the ifb0 interface, we continue to use the tc configuration and set a policy to further distribute the received traffic to the physical interfaces eno3 and eno4 through the mirred action. This step ensures that the filtered mirrored traffic can be effectively directed to two different downstream destinations.

[0066] Based on the forwarding rule, the flow data that does not comply with the flow control filtering rule is forwarded to the network port of the security device.

[0067] Specifically, in order to achieve traffic distribution and analysis, the network access control device is connected to the eno3 interface, which is responsible for compliance checking and management of traffic entering the network; and the network security data analysis platform receives traffic through the eno4 interface and conducts in-depth analysis to identify potential threats, performance bottlenecks or abnormal behaviors, providing decision support for network operation and maintenance.

[0068] In some embodiments, the identifying the network traffic data, filtering out the traffic data related to the RTSP protocol, and extracting parameters to form five-tuple information includes:

[0069] Use libpcap to capture data of said network traffic;

[0070] For the data of the network traffic, access the protocol type field in the Ethernet header, and filter out IPv4 data for the IP protocol according to the protocol type field;

[0071] For the IPv4 data, parse the protocol field of the IP header, and filter out TCP data according to the protocol field as the TCP protocol;

[0072] And obtaining a TCP data segment starting point for the TCP data, filtering out RTSP data according to the TCP data segment starting point as the RTSP protocol, so as to obtain the flow data related to the RTSP protocol.

[0073] In some embodiments, the network traffic includes data that is not destined for the local machine;

[0074] The security equipment includes a network access control device and a network security analysis platform.

[0075] In some embodiments, Figure 2 As shown, the present application also provides a flow data processing device 1, which is used to filter network mirror traffic based on the five-tuple of the Linux kernel, including:

[0076] Configuration module 11, used to configure the network port eth1 of the mirror traffic filtering device to a promiscuous mode to receive all passing network traffic;

[0077] The analysis module 12 is used to identify the data of the network traffic, filter out the traffic data related to the RTSP protocol, and extract parameters to form five-tuple information, wherein the parameters include the source IP address, the source port number, the target IP address, the target port number and the data transmission layer protocol;

[0078] The interface creation module 13 is used to load the ifb Linux kernel module and create a virtual network interface ifb0;

[0079] A matching module 14 is used to deploy queuing rules on the eth1 interface using the flow control tool of the ifb Linux kernel module, and configure flow control filtering rules based on the five-tuple information, and the hash table is set to efficiently search and match to match the flow data that meets the flow control filtering rules;

[0080] The discarding and mirroring module 15 is used to discard the traffic data that meets the traffic control and filtering rules, and set a mirroring operation at the same time to copy all the traffic data that does not meet the traffic control and filtering rules to the ifb0 interface.

[0081] In some embodiments, all interface creation modules 13 are further used to:

[0082] On the ifb0 interface, set forwarding rules;

[0083] And based on the forwarding rule, the flow data that does not comply with the flow control filtering rule is forwarded to the network port of the security device.

[0084] Specifically, Figure 3 A more specific overall architecture is illustrated. The eth1 of the mirror traffic filtering device is connected to the observation port of the switch, the eth2 of the mirror traffic filtering device is connected to the network access control device, and the eth3 of the mirror traffic filtering device is connected to the network security analysis platform; the traffic data processing method and device of the present application analyze the mirror data through the analysis program to obtain the five-tuple information, and by setting the Linux traffic control filtering rules, the network traffic is screened based on different five-tuple information, and the traffic is classified according to these conditions, and then the traffic that can be five-tuple is discarded, and other non-matching traffic is forwarded to the virtual network port. The virtual network interface sets the forwarding rules to forward the filtered mirror traffic data to the network port connected to the network access control device, the network security analysis platform, etc.

[0085] In some embodiments, the analysis module 12 is used to:

[0086] Use libpcap to capture data of said network traffic;

[0087] For the data of the network traffic, access the protocol type field in the Ethernet header, and filter out IPv4 data for the IP protocol according to the protocol type field;

[0088] For the IPv4 data, parse the protocol field of the IP header, and filter out TCP data according to the protocol field as the TCP protocol;

[0089] And obtaining a TCP data segment starting point for the TCP data, filtering out RTSP data according to the TCP data segment starting point as the RTSP protocol, so as to obtain the flow data related to the RTSP protocol.

[0090] In some embodiments, the network traffic includes data that is not destined for the local machine;

[0091] The security equipment includes a network access control device and a network security analysis platform.

[0092] After testing, the method and device provided by the present invention can effectively reduce the mirror traffic output to the security device for application scenarios containing a large amount of video surveillance data, such as Figure 4 shown.

[0093] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a device bus, and the communication interface is connected to the device bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating device and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a flow data processing method is implemented.

[0094] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a device bus, and the communication interface, the display unit and the input device are connected to the device bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device and a computer program. The internal memory provides an environment for the operation of the operating device and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a flow data processing method is implemented. The display unit of the computer device is used to form a visually visible image, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device casing, or an external keyboard, touchpad or mouse, etc.

[0095] Those skilled in the art will understand that Figure 5 and Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0096] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0097] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0098] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in any type of volatile or non-volatile storage device, or a combination thereof. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache.By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM Enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.

[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0102] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A flow data processing method, characterized in that: Used to filter network mirror traffic based on the Linux kernel's five-tuple, including: Configure the network port eth1 of the mirrored traffic filter device to promiscuous mode to receive all passing network traffic; Identify the network traffic data, filter out the traffic data related to the RTSP protocol, and extract parameters to form five-tuple information, wherein the parameters include a source IP address, a source port number, a target IP address, a target port number, and a data transmission layer protocol; Load the ifb Linux kernel module and create a virtual network interface ifb0; On the eth1 interface, the queuing rules are deployed using the flow control tool of the ifb Linux kernel module, and the flow control filtering rules are configured based on the five-tuple information, and the hash table is set to efficiently search and match to match the flow data that meets the flow control filtering rules; And taking a discard action for the flow data that meets the flow control filtering rules, and setting a mirroring operation at the same time, copying all the flow data that does not meet the flow control filtering rules to the ifb0 interface; The flow data processing method further includes: On the ifb0 interface, set forwarding rules; And based on the forwarding rule, the flow data that does not comply with the flow control filtering rule is forwarded to the network port of the security device.

2. A flow data processing method according to claim 1, characterized in that: The data of identifying the network traffic, filtering out the traffic data related to the RTSP protocol, and extracting parameters to form five-tuple information, including: Use libpcap to capture data of said network traffic; For the data of the network traffic, access the protocol type field in the Ethernet header, and filter out IPv4 data for the IP protocol according to the protocol type field; For the IPv4 data, parse the protocol field of the IP header, and filter out TCP data according to the protocol field as the TCP protocol; And obtaining a TCP data segment starting point for the TCP data, filtering out RTSP data according to the TCP data segment starting point as the RTSP protocol, so as to obtain the flow data related to the RTSP protocol.

3. A flow data processing method according to claim 2, characterized in that: The network traffic includes data whose destination is not the local machine; The security equipment includes a network access control device and a network security analysis platform.

4. A flow data processing device, characterized in that: Used to filter network mirror traffic based on the Linux kernel's five-tuple, including: A configuration module is used to configure the network port eth1 of the mirrored traffic filtering device to a promiscuous mode to receive all the network traffic passing through; An analysis module is used to identify the data of the network traffic, filter out the traffic data related to the RTSP protocol, and extract parameters to form five-tuple information, wherein the parameters include a source IP address, a source port number, a target IP address, a target port number, and a data transmission layer protocol; The interface creation module is used to load the ifb Linux kernel module and create a virtual network interface ifb0; A matching module is used to deploy queuing rules on the eth1 interface using the flow control tool of the ifb Linux kernel module, and configure flow control filtering rules based on the five-tuple information, and the hash table is set to efficiently search and match to match the flow data that meets the flow control filtering rules; and a discard and mirror module, which is used to take a discard action on the flow data that meets the flow control and filtering rules, and at the same time set a mirror operation to copy all the flow data that does not meet the flow control and filtering rules to the ifb0 interface; All interface creation modules are also used to: On the ifb0 interface, set forwarding rules; And based on the forwarding rule, the flow data that does not comply with the flow control filtering rule is forwarded to the network port of the security device.

5. A flow data processing device according to claim 4, characterized in that: The analysis module is used to: Use libpcap to capture data of said network traffic; For the data of the network traffic, access the protocol type field in the Ethernet header, and filter out IPv4 data for the IP protocol according to the protocol type field; For the IPv4 data, parse the protocol field of the IP header, and filter out TCP data according to the protocol field as the TCP protocol; And obtaining a TCP data segment starting point for the TCP data, filtering out RTSP data according to the TCP data segment starting point as the RTSP protocol, so as to obtain the flow data related to the RTSP protocol.

6. A flow data processing device according to claim 5, characterized in that: The network traffic includes data whose destination is not the local machine; The security equipment includes a network access control device and a network security analysis platform.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • ICMP hidden tunnel detection method and system thereof

    CN111988309A

  • Traffic control method, electronic equipment and storage medium

    CN116319561A