Hardware firewall, data filtering method and product
Through the hardware firewall, the external and internal networks are physically isolated, and the preliminary and secondary filtering strategies and content addressable memory are used to improve data transmission security and filtering efficiency, solving the problem of software firewall resource consumption and insufficient flexibility of hardware firewall, realizing the Efficient and secure network data processing.
Patent Information
- Application Number
- CN202411524216.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2024-11-26
AI Technical Summary
Existing software firewalls consume system resources when network traffic is large and are vulnerable to attacks, resulting in low data transmission security. The flexibility and scalability of hardware firewalls are limited, making it difficult to adapt to changing security threats.
Design a hardware firewall to perform preliminary filtering and secondary filtering of external network data packets through control devices, physically isolate external networks and intranets, use content addressable memory and buffer memory to improve filtering efficiency and security, and manage processors It shares data processing volume with the processor and supports a variety of filtering strategies and mode changes.
It improves the security of data transmission and the filtering efficiency of hardware firewalls, reduces system resource consumption, enhances the ability to respond to network threats, and the hardware firewall can be flexibly configured and upgraded to meet new security requirements.
Smart Images

Figure CN119030804A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data security, and in particular, to a hardware firewall, a data filtering method and a product. Background Art
[0002] At present, with the widespread development of network applications, network security has become increasingly important. The losses caused by viruses or hacker attacks are incalculable. Currently, the most widely used way of network security protection is to use firewalls. Among them, software firewalls are security programs installed on personal computers or servers to monitor inbound and outbound network traffic according to predetermined security rules.
[0003] However, software firewalls consume system resources such as the CPU and memory, thereby reducing the performance of the protected device, especially when there is heavy network traffic. Software firewalls are also more vulnerable to attacks because they reside on the same system to be protected. Malware that invades the host may render the firewall ineffective, resulting in lower security for data transmission between the internal and external networks. Summary of the invention
[0004] The embodiments of the present application provide a hardware firewall, a data filtering method and a product, aiming to improve the security of data transmission.
[0005] In a first aspect, an embodiment of the present application provides a hardware firewall, which is used to physically isolate an external network and an internal network that are not directly connected; The hardware firewall includes a control device, and the control device is configured to: Receiving a current data packet from an external network, and executing a preliminary filtering strategy on a header field of the current data packet; When the preliminary filtering strategy is passed, a secondary filtering strategy is executed on the current data packet; The current data packet that passes the secondary filtering strategy is transmitted to the intranet.
[0006] Optionally, when the control device is configured to execute a preliminary filtering strategy on the header field of the current data packet, the method includes: The control device is configured to: Parsing the header field of the current data packet to obtain the network masks of the source address and the destination address of the current data packet; Determine whether the network masks of the source address and the destination address of the current data packet belong to a preset address set; When the network masks of the source address and the destination address of the current data packet belong to a preset address set, it is determined that the current data packet passes the preliminary filtering strategy.
[0007] Optionally, the control device is further configured to: When the network mask of the source address or the network mask of the destination address of the current data packet does not belong to the preset address set, the current data packet is discarded.
[0008] Optionally, when the control device is configured to execute a secondary filtering strategy on the current data packet, the method includes: The control device is configured to: Parsing the current data packet to generate a target filtering field of the current data packet; Determine whether the target filter field of the current data belongs to a filter field set; When the target filter field of the current data belongs to a filter field set, it is determined that the current data packet passes the secondary filtering strategy, wherein the target filter field includes a source port number, a target port number, a source address, a target address, and a physical address field.
[0009] Optionally, the control device is further configured to: When the target filtering field of the current data does not belong to the filtering field set, the current data packet is discarded.
[0010] Optionally, the firewall further comprises a content addressable memory, and the filter field set is stored in the content addressable memory; The control device is configured to: In the process of determining whether the target filter field of the current data belongs to a filter field set, sending the target filter field of the current data to the content addressable memory; When the content addressable memory is received and determines that it stores the target filter field of the current data, the storage location of the target filter field is returned to determine whether the target filter field of the current data belongs to a filter field set.
[0011] Optionally, the hardware firewall further includes a first buffer memory and a second buffer memory; The control device is configured to: In the process of transmitting the data packets passing the secondary filtering strategy to the intranet, the data packets passing the secondary filtering strategy are polled and written into the first buffer memory and the second buffer memory. The data packets in the first buffer memory and the second buffer memory are data packets that are allowed to be read by any node in the intranet.
[0012] Optionally, the first buffer memory and the second buffer memory are also used to receive any data packet sent from the intranet.
[0013] Optionally, the control device is further configured to: polling and reading any data packet sent from the intranet in the first buffer memory or the second buffer memory; Implement a sending filtering strategy for any sent data packet; The sending data packets that pass the sending filtering policy are transmitted to the external network.
[0014] Optionally, when the control device is configured to perform a sending filtering strategy on any sent data packet, the configuration includes: The control device is configured to: Parse any sent data packet to generate a target filter field for the sent data packet; Determine whether the target filter field of the sent data packet belongs to a filter field set; When the target filtering field of the sending data packet belongs to the filtering field set, it indicates that the sending data packet passes the sending filtering policy; The target filtering field includes a source port number, a target port number, a source address, a target address, and a physical address field.
[0015] Optionally, the control device includes a management processor, a first processor and a second processor; The management processor is configured to receive a current data packet from an external network and send a first processing instruction to the first processor, wherein the first processing instruction carries a header field of the current data packet; The first processor is configured to execute a preliminary filtering strategy on the header field of the current data packet in response to the first processing instruction, and send a continue sending instruction to the management processor when the current data packet passes the preliminary filtering strategy; The management processor is configured to send the current data packet to the second processor in response to the continue sending instruction; The second processor is configured to execute a secondary filtering policy on the current data packet when receiving the current data packet, and transmit the current data packet that passes the secondary filtering policy to the intranet.
[0016] Optionally, the second processor is configured to read any transmission data packet from the intranet, perform a transmission filtering policy on any transmission data packet, and send a data transmission interrupt to the management processor after the transmission data packet passes the transmission filtering policy; The management processor is configured to send the transmission data packet to an external network in response to the data transmission interruption.
[0017] Optionally, the control device is configured to: In response to the firewall mode change instruction, obtaining a changed firewall security protection mode, and changing the current firewall security protection mode to the changed firewall security protection mode; The firewall security and fire protection mode includes multiple filtering strategies for any current data packet and the execution order of the multiple filtering strategies.
[0018] Optionally, the control device is further configured to: Before responding to the firewall mode change instruction, a security check is performed on the received firewall mode change instruction, and when the firewall mode change instruction passes the security check, the firewall mode change instruction is responded to.
[0019] Optionally, the control device is further configured to: When the firewall mode change instruction fails to pass the security check, a security warning message is sent to any node in the intranet, and the security warning message is used to prompt that there is currently a firewall mode change instruction that fails to pass the security check.
[0020] In a second aspect, an embodiment of the present application provides a server cluster, wherein the server cluster includes multiple server nodes, and a hardware firewall as described in the first aspect of the embodiment is provided on any server node.
[0021] In a third aspect, an embodiment of the present application provides a data filtering method, which is applied to the hardware firewall described in the first aspect of the embodiment, and the method includes: Receiving a current data packet from an external network, and executing a preliminary filtering strategy on a header field of the current data packet; When the preliminary filtering strategy is passed, a secondary filtering strategy is executed on the current data packet; The current data packet that passes the secondary filtering strategy is transmitted to the intranet.
[0022] In a fourth aspect, an embodiment of the present application provides a computer device, comprising: at least one processor, and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the data filtering method described in the second aspect of the embodiment is executed.
[0023] In a fifth aspect, an embodiment of the present application provides a non-volatile readable storage medium, wherein the non-volatile readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the data filtering method described in the second aspect of the embodiment is performed.
[0024] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the data filtering method described in the second aspect of the embodiment.
[0025] Beneficial effects: The hardware firewall provided in this embodiment is used to physically isolate the external network and the internal network that are not directly connected; the hardware firewall includes a control device, and the control device is configured to: receive a current data packet from the external network, and execute a preliminary filtering policy on the header field of the current data packet; when the preliminary filtering policy is passed, execute a secondary filtering policy on the current data packet; and transmit the current data packet that passes the secondary filtering policy to the internal network.
[0026] The external network and the internal network are physically isolated by the hardware firewall. For the current data packet sent from the external network to the internal network, the preliminary filtering strategy is first performed according to the header field of the data packet, that is, the data packet is preliminarily judged according to the header field. If it does not pass the preliminary filtering strategy, the current data packet can be directly discarded. Only after the preliminary filtering strategy is passed, the secondary filtering strategy is performed, and the current data packet that passes the secondary filtering strategy is sent to the internal network. The preliminary filtering strategy and the secondary filtering strategy can not only improve the security of data packet transmission, but also improve the filtering efficiency of the hardware firewall. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions.
[0028] Figure 1 A schematic diagram of the structure of a hardware firewall provided in an embodiment of the present application is shown; Figure 2 The application network topology of the hardware firewall provided by the embodiment of the present application is shown; Figure 3 A schematic diagram of a hardware firewall provided in an embodiment of the present application is shown; Figure 4 A schematic diagram of a hardware firewall provided in an embodiment of the present application is shown; Figure 5 A schematic diagram of a hardware firewall provided in an embodiment of the present application is shown; Figure 6 A flowchart showing the steps of the data filtering method provided by an embodiment of the present application is shown; Figure 7 A schematic diagram of the architecture of a server cluster provided in an embodiment of the present application is shown; Figure 8 A schematic diagram of a computer device provided in an embodiment of the present application is shown; Fig. 9 A schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application is shown; Fig.10A schematic diagram of a computer program product provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0030] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in each embodiment of the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not constitute any limitation, and the various embodiments can be combined with each other and referenced to each other without contradiction.
[0031] CPU: Central Processing Unit, central processing unit; CPLD: Complex Programmable Logic Device, complex programmable logic device; TCP / IP: Transmission Control Protocol / Internet Protocol, Transmission Control Protocol / Internet Protocol; MAC: Media Access Control Address, media access control address or hardware address; IDS: intrusion detection system, intrusion detection system; IP address: Internet Protocol Address, Internet Protocol address; CAM: content-addressable memory, content-addressable memory; RAM: Random Access Memory, random access memory; SCSI: Small Computer System Interface, an interface standard for connecting computer external devices, defining the communication protocol between computers and external devices; SDRAM: synchronous dynamic random-access memory; LED: Light Emitting Diode (LED) panel, LED electronic display.
[0032] At present, with the widespread development of network applications, network security is becoming increasingly important. The losses caused by viruses or hacker attacks are incalculable. Currently, the most widely used way of network security protection is to use firewalls. Application firewalls include software firewalls and hardware firewalls.
[0033] Among them, a software firewall is a security program installed on a personal computer or server to monitor inbound and outbound network traffic based on predetermined security rules.
[0034] Hardware firewalls are mainly designed for gateways. They are physical devices that serve as a barrier between internal networks and the external Internet or other untrusted networks. They are critical to network security and can control and monitor inbound and outbound network traffic according to predetermined security rules to resist various network threats. They are usually used to defend corporate boundaries and guide all traffic through central devices for inspection. Centralized firewalls are easier to manage, operate from a single control point, and provide unified policy enforcement. The main chips currently used in hardware firewalls include application-specific integrated circuits and network processors, but they have high design and update costs and poor adaptability to changing security threats.
[0035] Although software firewalls have important security advantages, they consume system resources such as CPU and memory, which can reduce the performance of the protected device, especially when the network traffic is large. Software firewalls are also more vulnerable to attacks because they reside on the same system to be protected, and malware that invades the host may render the firewall ineffective; in addition, compared with the centralized management and unified policy execution provided by hardware firewalls, the management process of software firewalls on multiple devices is cumbersome and there is a problem of inability to synchronize management, so software firewalls are not suitable for protecting larger and more complex network environments.
[0036] Because centralized gateways rely on a single gateway, they have greater security risks. Single-point control may become a bottleneck and attack target. If the firewall fails, it may cause the entire network to be disrupted. In addition, their scalability is limited. As network traffic increases, centralized firewalls may encounter performance bottlenecks. Expanding centralized firewalls requires a lot of upgrades or replacements. Routing all traffic through a central point may cause delays, especially in geographically dispersed networks.
[0037] The disadvantages of current whole-box hardware firewalls include, but are not limited to: Limited flexibility: Hardware firewalls may be rigid, making it challenging to customize without technical assistance; Difficult to upgrade: As technology advances, hardware firewalls may become obsolete and require expensive replacement.
[0038] In order to solve the problem of weak data transmission security caused by the application of software firewalls, an embodiment of the present application provides a hardware firewall to ensure strong real-time network security.
[0039] Reference Figure 1 , showing a schematic diagram of the structure of a hardware firewall provided in an embodiment of the present application, wherein the hardware firewall is used to physically isolate an external network and an internal network that are not directly connected; the hardware firewall includes a control device, and the control device is configured to: receive a current data packet from the external network, and execute a preliminary filtering strategy on the header field of the current data packet; when the preliminary filtering strategy is passed, execute a secondary filtering strategy on the current data packet; and transmit the current data packet that passes the secondary filtering strategy to the internal network.
[0040] Reference Figure 2 , showing the application network topology of the hardware firewall provided in the embodiment of the present application; the hardware firewall provided in this embodiment is also based on GAP technology, using physical isolation to ensure security and cope with the challenges of information exchange between networks, thereby overcoming application risks caused by security issues; GAP technology refers to the realization of secure data transmission and resource sharing between two or more networks that are not directly connected; and the hardware firewall provided in this embodiment is set between the external network and the internal network, so that the external network and the internal network are not directly connected, ensuring that the link layer of the network always remains disconnected, effectively blocking TCP / IP and other network protocols, thereby greatly enhancing the security of the internal network.
[0041] Moreover, unlike firewalls and intrusion detection systems (IDS) that actively combat hacker intrusions, GAP technology isolates the network medium itself to prevent any potential attacks. While maintaining logical connections, GAP technology physically disconnects internal and external networks, creating a secure environment where traditional hacking techniques cannot work.
[0042] In the actual implementation process, the control device can adopt a device with computing capabilities, such as a processor such as a CPU.
[0043] In a feasible implementation, when the control device is configured to execute a preliminary filtering strategy on the header field of the current data packet, the control device is configured to: parse the header field of the current data packet to obtain the network masks of the source address and destination address of the current data packet; determine whether the network masks of the source address and destination address of the current data packet belong to a preset address set; specifically, the source address and destination address refer to IP addresses.
[0044] When the network masks of the source address and the destination address of the current data packet belong to a preset address set, it is determined that the current data packet passes the preliminary filtering strategy.
[0045] When the network mask of the source address or the network mask of the destination address of the current data packet does not belong to the preset address set, the current data packet is discarded.
[0046] In a feasible implementation, when the control device is configured to execute a secondary filtering strategy on the current data packet, the control device is configured to: parse the current data packet to generate a target filter field of the current data packet; and determine whether the target filter field of the current data packet belongs to a filter field set.
[0047] The target filtering field includes a source port number, a target port number, a source address, a target address, and a physical address field; specifically, the source address and the target address refer to an IP address, and the physical address field refers to a MAC address field.
[0048] When the target filtering field of the current data belongs to a filtering field set, it is determined that the current data packet passes the secondary filtering strategy.
[0049] When the target filtering field of the current data does not belong to the filtering field set, the current data packet is discarded.
[0050] In a feasible implementation, in order to improve the matching speed of the target filter field of the current data in the filter field set, the filter field set can be stored in a content addressable memory; the content addressable memory is a CAM memory, which is a special storage array RAM. The main working mechanism is to automatically and simultaneously compare an input data item with all data items stored in the CAM memory, determine whether the input data item matches the data item stored in the CAM memory, and output the matching information corresponding to the data item.
[0051] The control device sends the target filter field of the current data to the content addressable memory during the process of determining whether the target filter field of the current data belongs to a filter field set.
[0052] The content addressable memory is used to determine whether the target filter field of current data is stored in the content addressable memory, and when the target filter field is stored in the content addressable memory, the storage location of the target filter field is returned to the control device.
[0053] After receiving the storage location of the target filter field returned by the content addressable memory, the control device determines that the target filter field of the current data belongs to a filter field set.
[0054] When the target filter field is not stored in the content addressable memory, empty data of the target filter field is returned to the control device or no data is returned.
[0055] High-speed data search and matching of target filter fields and filter field sets based on CAM memory can provide fast address lookup and reduce the delay of data packet processing.
[0056] In a feasible implementation, the hardware firewall also includes a first buffer memory and a second buffer memory; the control device is configured to: in the process of transmitting the data packets passing the secondary filtering policy to the intranet, poll the data packets passing the secondary filtering policy and write them into the first buffer memory and the second buffer memory, and the data packets in the first buffer memory and the second buffer memory are data packets that are allowed to be read by any node in the intranet.
[0057] In addition, the first buffer memory and the second buffer memory are also used to poll and receive any data packet sent from the intranet.
[0058] For example, the control device is further configured to: Poll and read any transmission data packet from the intranet in the first buffer memory or the second buffer memory; perform a transmission filtering strategy on any transmission data packet; and transmit the transmission data packet that passes the transmission filtering strategy to the external network.
[0059] In a feasible implementation, when the control device is configured to perform a filtering policy on any transmitted data packet, the control device is configured to: parse any transmitted data packet to generate a target filtering field for the transmitted data packet; and determine whether the target filtering field of the transmitted data packet belongs to a filtering field set.
[0060] The target filtering field includes a source port number, a target port number, a source address, a target address, and a physical address field.
[0061] When the target filtering field of the sending data packet belongs to the filtering field set, it indicates that the sending data packet passes the sending filtering policy, and the sending data packet can be sent to the external network.
[0062] In a feasible implementation, in order to facilitate the hardware firewall to provide more data filtering modes, the control device obtains a changed firewall security protection mode when responding to a firewall mode change instruction, and can change the current firewall security protection mode to the changed firewall security protection mode; wherein the firewall security protection mode includes multiple filtering strategies for any current data packet and the execution order of the multiple filtering strategies.
[0063] Optionally, in order to further improve the security of the firewall and avoid malicious attacks, the control device is also configured to: perform a security check on the received firewall mode change instruction before responding to the firewall mode change instruction, and respond to the firewall mode change instruction after the firewall mode change instruction passes the security check.
[0064] When the firewall mode change instruction fails to pass the security check, a security warning message is sent to any node in the intranet, and the security warning message is used to prompt that there is currently a firewall mode change instruction that fails to pass the security check.
[0065] For example, a preset verification code can be set in the firewall mode change instruction. By verifying the verification code, it can be detected whether the firewall mode change instruction is a safe instruction. In the actual implementation process, a symmetric encryption algorithm or the like can also be used for security verification, which is not limited in this embodiment.
[0066] The hardware firewall provided in this embodiment physically isolates the external network and the internal network. For the current data packet sent from the external network to the internal network, the data packet is first preliminarily judged according to the header field. If it does not pass the preliminary filtering policy, the current data packet can be directly discarded. Only after the preliminary filtering policy is passed, the secondary filtering policy is implemented, and the current data packet that passes the secondary filtering policy is sent to the internal network. Through the preliminary filtering policy and the secondary filtering policy, the security of data packet transmission can be improved, and the filtering efficiency of the hardware firewall can be improved.
[0067] Reference Figure 3 , showing a schematic diagram of a hardware firewall provided in an embodiment of the present application, the firewall includes a control device, the control device includes a management processor, a first processor and a second processor, the second processor is connected to a first buffer memory and a second buffer memory respectively.
[0068] In the process of processing data packets sent from the external network to the internal network: The management processor is configured to receive a current data packet from an external network and send a first processing instruction to the first processor, wherein the first processing instruction carries a header field of the current data packet.
[0069] The first processor is configured to execute a preliminary filtering strategy on a header field of the current data packet in response to the first processing instruction.
[0070] Specifically, the first processor parses the header field of the current data packet to obtain the network masks of the source address and the destination address of the current data packet; and determines whether the network masks of the source address and the destination address of the current data packet belong to a preset address set.
[0071] When the network mask of the source address or the network mask of the destination address of the current data packet does not belong to a preset address set, the first processor sends a discard instruction to the management processor, and the management processor discards the current data packet in response to the discard instruction; by way of example, the discard instruction may also carry an identifier of the current data packet, or carry a header field of the current data packet, so that the management processor can correspond to the current data packet that needs to be discarded.
[0072] When the network masks of the source address and the destination address of the current data packet belong to a preset address set, it is determined that the current data packet passes the preliminary filtering strategy. At this time, the first processor sends a continue sending instruction to the management processor. The continue sending instruction may carry an identifier of the current data packet, or carry a header field of the current data packet.
[0073] The management processor is configured to, after responding to the continue sending instruction, send the current data packet corresponding to the continue sending instruction to the second processor according to the identifier or header field of the current data packet carried in the continue sending instruction.
[0074] The second processor is configured to execute a secondary filtering policy on the current data packet when receiving the current data packet, and transmit the current data packet that passes the secondary filtering policy to the intranet.
[0075] Specifically, the second processor is configured to parse the current data packet to generate a target filter field of the current data packet; and determine whether the target filter field of the current data packet belongs to a filter field set.
[0076] The target filtering field includes a source port number, a target port number, a source address, a target address, and a physical address field.
[0077] When the target filtering field of the current data does not belong to a filtering field set, the second processor discards the current data packet.
[0078] When the target filtering field of the current data belongs to a filtering field set, it is determined that the current data packet passes the secondary filtering strategy, and the current data packet is written into the first buffer memory or the second buffer memory.
[0079] In the process of processing data packets sent from the intranet to the extranet: The data packets sent by any node in the intranet are buffered and stored in the first buffer memory or the second buffer memory.
[0080] The second processor is configured to read any transmission data packet from the intranet from the first buffer memory or the second buffer memory, perform a transmission filtering policy on any transmission data packet, and send a data transmission interrupt to the management processor after the transmission data packet passes the transmission filtering policy.
[0081] Specifically, in the process of sending the filtering policy, the second processor parses any sent data packet to generate a target filtering field for the sent data packet; determines whether the target filtering field of the sent data packet belongs to a filtering field set; wherein the target filtering field includes a source port number, a target port number, a source address, a target address, and a physical address field.
[0082] When the target filter field of the sending data packet belongs to the filter field set, it indicates that the sending data packet passes the sending filter policy and the sending data packet can be sent to the external network. At this time, the second processor sends a data sending interrupt to the management processor and sends the sending data packet to the management processor; the management processor is configured to send the sending data packet to the external network in response to the data sending interrupt.
[0083] In a feasible implementation manner, in order to facilitate the hardware firewall to provide more data filtering modes, the management processor performs a security check on the firewall mode change instruction when receiving the firewall mode change instruction. When the firewall mode change instruction passes the security check, the management processor responds to the firewall mode change instruction, obtains the changed firewall security protection mode, and changes the current firewall security protection mode to the changed firewall security protection mode. The firewall security protection mode includes multiple filtering policies for any current data packet and the execution order of the multiple filtering policies. When the firewall mode change instruction fails to pass the security check, a security warning message is sent to any node in the intranet, prompting that there is currently a firewall mode change instruction that has not passed the security check.
[0084] In the hardware firewall provided in this embodiment, since the data processing volume is large when the second processor executes the secondary filtering strategy, the first processor executes the preliminary filtering strategy, and the second processor executes the secondary filtering strategy, while the management processor is used to receive data packets, send data packets, and switch data packet processes, etc., which can reduce the data processing volume of the second processor, while improving the security of data transmission and the efficiency of the data filtering process.
[0085] Reference Figure 4 , showing a schematic diagram of a hardware firewall provided in an embodiment of the present application, wherein the control device of the hardware firewall may adopt a complex programmable logic device, namely, a CPLD, and the complex programmable logic device is provided with a data transceiver module, a firewall switching module, a network logic module, and a network firewall module.
[0086] When hardware firewalls are designed based on CPLD, CPLD, with its reprogrammable nature, allows for rapid updates and modifications to adapt to new security requirements without expensive redesign. In practical applications, the fixed number of logic gates of CPLD is suitable for implementing combinational and sequential logic functions, and the cost is extremely low compared to hardware firewalls. It can be flexibly configured and upgraded, and is therefore very suitable for the real-time processing needs of network firewalls.
[0087] Specifically, the data transceiver module is used to receive the current data packet from the external network and send it to the firewall switching module; the data transceiver module is also used to send the data packet from the internal network to the external network.
[0088] The firewall switching module is used to send the header field of the current data packet to the network logic module, or in response to the continue sending instruction corresponding to the current data packet sent by the network logic module, send the current data packet to the network firewall module.
[0089] The network logic module is used to execute a preliminary filtering strategy on the header field of the received current data packet, and when the preliminary filtering strategy is passed, send a continue sending instruction to the firewall switching module.
[0090] The network firewall module is used to execute a secondary filtering strategy on the current data packet sent by the firewall switching module, and transmit the current data packet that passes the secondary filtering strategy to the intranet.
[0091] Reference Figure 5, showing a schematic diagram of the hardware firewall provided in this embodiment. In a feasible implementation, when the data transceiver module receives the current data packet from the external network, it sends it to the firewall switching module. The firewall switching module sends the header field of the current data packet to the network logic module, and the network logic module executes a preliminary filtering strategy on the header field of the received current data packet.
[0092] In the process of executing the preliminary filtering strategy on the header field of the received current data packet, the network logic module is used to: parse the header field of the current data packet to obtain the network masks of the source address and the destination address of the current data packet.
[0093] Then the network logic module is used to determine whether the network masks of the source address and the destination address of the current data packet belong to a preset address set; the preset address set stores the network masks of the source address and the destination address of any data allowed to enter the intranet.
[0094] When the network masks of the source address and the destination address of the current data packet belong to a preset address set, it is determined that the current data packet passes the preliminary filtering strategy.
[0095] When the network mask of the source address or the network mask of the destination address of the current data packet does not belong to a preset address set, the network logic module sends a discard instruction corresponding to the current data packet to the firewall switching module; the firewall switching module is used to discard the current data packet in response to the discard instruction corresponding to the current data packet.
[0096] When the network mask of the source address or the network mask of the destination address of the current data packet belongs to a preset address set, that is, the current data packet passes the preliminary filtering strategy, the network logic module is used to send a continue sending instruction to the firewall switching module; the firewall switching module is used to send the current data packet to the network firewall module in response to the continue sending instruction corresponding to the current data packet sent by the network logic module.
[0097] In a feasible implementation, the hardware firewall further includes a network mask module using two RAM modules, each module having 16 32-bit words for storing the network mask of the source address and destination address of any data packet.
[0098] The network firewall module executes a secondary filtering strategy on the current data packet sent by the firewall switching module, and transmits the current data packet that passes the secondary filtering strategy to the intranet.
[0099] Specifically, during the process in which the network firewall module executes the secondary filtering strategy on the current data packet sent by the firewall switching module, the network firewall module is used to parse the current data packet and generate a target filtering field for the current data packet.
[0100] For example, the target filter field may include a source port number, a target port number, a source address, a target address, and a physical address field.
[0101] Then, the network firewall module determines whether the target filter field of the current data belongs to a filter field set.
[0102] When the target filtering field of the current data belongs to a filtering field set, it is determined that the current data packet passes the secondary filtering strategy.
[0103] When the target filtering field of the current data does not belong to the filtering field set, the network firewall module is used to discard the current data packet.
[0104] In a feasible implementation, the filter field set may be stored in a content addressable memory; high-speed data search and matching of the target filter field and the filter field set based on the CAM memory may provide fast address lookup and low data packet processing delay.
[0105] Therefore, in this embodiment, the filter field set is stored in the CAM memory, and then when the network firewall module determines whether the target filter field of the current data belongs to the filter field set, the network firewall module is used to send the target filter field of the current data to the content addressable memory.
[0106] The content addressable memory is used to determine whether it stores the target filter field of the current data. When the target filter field is stored in the content addressable memory, the storage location of the target filter field is returned to the network firewall module; when the target filter field is not stored in the content addressable memory, empty data of the target filter field is returned to the network firewall module or no data is returned.
[0107] The network firewall module is used to determine whether the target filter field of the current data belongs to a filter field set according to whether the storage location of the target filter field returned by the content addressable memory is received.
[0108] In this hardware firewall, by setting up a firewall switching module, when any current data packet from the external network is received, the network logic module first performs preliminary filtering according to the header field of the current data packet, and parses and determines whether the network masks of the source address and the destination address of the current data packet belong to the preset address set. If they belong to the preset address set, the current data packet is allowed to enter the network firewall module for secondary filtering. During the secondary filtering process, the target filter field is more carefully filtered than the network logic module which only determines the source address and the destination address. Since the network firewall module needs to parse and determine a larger amount of data, the network logic module performs preliminary filtering, and the current data packet that does not meet the preliminary filtering can be directly discarded without being sent to the network firewall module, thereby not occupying the data processing of the network firewall module, further reducing the data processing delay and improving the interception efficiency of the data packet.
[0109] In a feasible implementation, the hardware firewall also includes a first buffer memory and a second buffer memory; when the network firewall module transmits the data packets that pass the secondary filtering policy to the intranet, the network firewall module is used to poll and write the current data packets that pass the secondary filtering policy into the first buffer memory and the second buffer memory, and the data packets in the first buffer memory and the second buffer memory are data packets that are allowed to be read by any node in the intranet.
[0110] The first buffer memory and the second buffer memory are also used to receive any data packet sent from the intranet.
[0111] Specifically, the complex programmable logic device CPLD of the hardware firewall can be connected to the first buffer memory or the second buffer memory through the first controller and the second controller respectively. Specifically, the first controller is a SCSI protocol-based controller and the second controller is an SDRAM controller, so as to realize reading and writing any data packet to the first buffer memory, or reading and writing any data packet to the second buffer memory, that is, high-speed transmission between the CPLD and the first buffer memory or the second buffer memory can be realized based on the SCSI protocol.
[0112] In the actual implementation process, the CPLD of the hardware firewall of this embodiment uses a SCSI protocol controller and an SDRAM controller to realize the communication between the CPLD and the external memory, and the combination of the two memories can realize a ping-pong transmission mechanism.
[0113] Specifically, the ping-pong transmission mechanism is exemplified as follows: (1) Initialization: The CPLD initializes the first buffer memory and the second buffer memory, and sets a SCSI interface for communication between the first buffer memory and the second buffer memory; both memories are configured as a ping-pong transmission mechanism.
[0114] (2) CPLD reads data from the first buffer memory.
[0115] The CPLD sends a command to read and send data packets to the first buffer memory through the SCSI protocol controller and the SDRAM controller; the read send data packets are read from the first buffer memory into the buffer of the CPLD, and subsequently sent to the network firewall module for filtering.
[0116] (3) The CPLD writes the current data packet into the second buffer memory.
[0117] After reading the transmission data packet from the first buffer memory, the CPLD writes the current data packet into the second buffer memory through the SCSI protocol controller and the SDRAM controller.
[0118] (4) Ping-Pong switching: After writing the current data packet to the second buffer memory, the CPLD uses the second buffer memory as the object of the next data read operation, while the first buffer memory becomes the object of the next current data packet write operation.
[0119] (5) Continuous operation steps (2) to (4) are repeated in a continuous cycle to ensure seamless and efficient data transfer between memories.
[0120] That is, in the process of CPLD sending data packets from the external network to the internal network or sending data packets from the internal network to the external network, the first buffer memory and the second buffer memory are used as buffers for temporary storage of data packets, and the reading and writing process of CPLD in the first buffer memory and the second buffer memory is a ping-pong transmission process of reading the first buffer memory, writing the second buffer memory, reading the second buffer memory, and writing the first buffer memory, thereby avoiding the CPLD from continuously performing read and write operations with the same buffer memory, which may cause the transmission channel to be blocked and cause a large delay.
[0121] In a feasible implementation, when the complex programmable logic device reads any sending data packet in the first buffer memory or the second buffer memory, it sends it to the network firewall module; the network firewall module is used to parse the sending data packet and generate a target filter field of the sending data packet; determine whether the target filter field of the sending data packet belongs to a filter field set; when the target filter field of the sending data packet belongs to the filter field set, execute the data sending process to send the sending data packet to the external network.
[0122] When the intranet sends data packets to the extranet, you can also set a source address range. If the target filter field of any sent data packet belongs to the source address range, it is allowed to be sent to the extranet. If the target filter field of any sent data packet does not belong to the source address range, it is not allowed to be sent to the extranet, thereby further improving the network security of the intranet and avoiding data leakage.
[0123] Specifically, the data sending process includes: The network firewall module is used to send a data sending interrupt to the network logic module, and send the sending data packet to the firewall switching module; the network logic module is used to send a data packet sending switching instruction to the firewall switching module in response to the data sending interrupt; the firewall switching module is used to switch to the sending data state in response to the data packet sending switching instruction, and send the sending data packet to the data transceiver module, and the data transceiver module sends the sending data packet to the external network.
[0124] In a feasible implementation, based on the editable characteristics of CPLD, the filtering policy of the hardware firewall can also be modified. Specifically, the network logic module is used to respond to the firewall mode change instruction, obtain the changed firewall security protection mode, and modify the preliminary filtering policy and the secondary filtering policy of the network firewall module.
[0125] In order to further improve the security of the firewall and avoid malicious attacks, before modifying the preliminary filtering strategy and the secondary filtering strategy of the network firewall module, the network logic module is also used to: after receiving the firewall mode change instruction, perform a security check on the firewall mode change instruction; when the firewall mode change instruction passes the security check, modify the preliminary filtering strategy and the secondary filtering strategy of the network firewall module according to the changed firewall security protection mode.
[0126] When the firewall mode change instruction fails to pass the security check, the network logic module is also used to send a security warning message to any node in the intranet, and the security warning message is used to prompt that there is currently a firewall mode change instruction that fails to pass the security check.
[0127] In a feasible implementation, the CPLD is also provided with a display screen, which may be an LED display screen that can display the identification of the current firewall mode, thereby conveniently prompting whether a change in the firewall mode has been sent, thereby promptly discovering and handling malicious network attacks.
[0128] The hardware firewall provided in this embodiment uses CPLD to design a hardware firewall for high-speed data processing and real-time traffic filtering, which can bring multiple benefits. Specifically, by integrating CPLD into the firewall, since CPLD itself has the ability to process data at hardware speed, this solution can ensure reduced latency and high-speed performance, and can achieve efficient and real-time traffic filtering; the parallel processing capability of CPLD can process multiple data streams simultaneously, thereby further improving performance and ensuring effective management of high-speed network traffic.
[0129] The CPLD+2 memory (first buffer memory and second buffer memory) scheme implemented using the ping-pong mechanism greatly reduces the impact on network speed. The scheme ensures continuous data processing by alternating the use of two memory banks. While one buffer memory is being read, the other buffer memory is being written. This method can maintain high throughput while minimizing packet loss, thereby maintaining network speed and reliability; the optimized data flow achieved through this mechanism ensures seamless data transmission, making the firewall very effective in maintaining network performance.
[0130] In addition, the hardware-based nature of the firewall enhances security and reliability; dedicated hardware is less susceptible to software vulnerabilities and vulnerability exploits, providing additional protection against malicious attacks; the reconfigurability of the CPLD allows the implementation of customized security policies, ensuring that the firewall can adapt to changing security requirements; and the high efficiency and low power consumption of the CPLD make the solution cost-effective, reducing the total cost of ownership while providing robust, scalable network protection.
[0131] In terms of upgrades and updates, the CPLD can be programmed and configured in real time to ensure that the firewall can handle various network protocols and support stateful packet inspection; the CPLD can be easily updated or reconfigured to cope with ever-changing security threats and provide a cost-effective solution with high performance and high reliability.
[0132] Reference Figure 6 , shows a flow chart of the steps of a data filtering method provided by the present application, the method is applied to the hardware firewall described in this embodiment, the method includes: S101: Receive a current data packet from an external network, and execute a preliminary filtering strategy on a header field of the current data packet.
[0133] S102: When the preliminary filtering strategy is passed, a secondary filtering strategy is executed on the current data packet.
[0134] S103: Transmitting the current data packet that passes the secondary filtering strategy to an intranet.
[0135] Reference Figure 7 , showing a schematic diagram of the architecture of a server cluster provided by the implementation of the present application, the server cluster includes multiple server nodes, and any server node is provided with a hardware firewall as described in this embodiment. Specifically, the hardware firewall described in this embodiment can be burned on the mainboard of any server node.
[0136] For example, a central gateway in a server cluster can manage the policies and configurations of the internal network of the entire server cluster.
[0137] Any hardware firewall installed on a server node can process data packets from the local gateway first, reducing the traffic that needs to traverse the entire network and optimizing bandwidth usage; when a hardware firewall on a server node fails, the hardware firewalls on other server nodes in the server cluster can take over the filtering task of the failed hardware firewall to ensure continuous network operation. Distributed gateways can also implement additional local security measures for specific network segments.
[0138] Reference Figure 8 , shows a schematic diagram of a computer device provided in an embodiment of the present application, including: at least one processor 801, and a memory 802, wherein the memory 802 stores a computer program that can be run on the processor 801, wherein the processor 801 executes the data filtering method described in this embodiment when executing the computer program.
[0139] Reference Fig. 9 , shows a schematic diagram of a non-volatile readable storage medium provided in an embodiment of the present application, wherein the non-volatile readable storage medium 900 stores a computer program 901, wherein the computer program 901 performs the data filtering method described in this embodiment when executed by a processor.
[0140] Reference Fig.10 , shows a schematic diagram of a computer program product provided in an embodiment of the present application, wherein the computer program product 1000 includes a computer program / instruction 1001, which implements the data filtering method described in this embodiment when executed by a processor.
[0141] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0142] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0143] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0146] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0147] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0148] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A hardware firewall, characterized in that: The hardware firewall is used to physically isolate the external network and the internal network that are not directly connected; The hardware firewall includes a control device, and the control device is configured to: Receiving a current data packet from an external network, and executing a preliminary filtering strategy on a header field of the current data packet; When the preliminary filtering strategy is passed, a secondary filtering strategy is executed on the current data packet; The current data packet that passes the secondary filtering strategy is transmitted to the intranet.
2. The firewall according to claim 1, characterized in that: When the control device is configured to execute a preliminary filtering strategy on the header field of the current data packet, the method comprises: The control device is configured to: Parsing the header field of the current data packet to obtain the network masks of the source IP address and the destination address of the current data packet; Determine whether the network masks of the source address and the destination address of the current data packet belong to a preset address set; When the network masks of the source address and the destination address of the current data packet belong to a preset address set, it is determined that the current data packet passes the preliminary filtering strategy.
3. The firewall according to claim 2, characterized in that: The control device is further configured to: When the network mask of the source address or the network mask of the destination address of the current data packet does not belong to the preset address set, the current data packet is discarded.
4. The firewall according to claim 1, characterized in that: When the control device is configured to execute a secondary filtering strategy on the current data packet, the control device includes: The control device is configured to: Parsing the current data packet to generate a target filtering field of the current data packet; Determine whether the target filter field of the current data belongs to a filter field set; When the target filter field of the current data belongs to a filter field set, it is determined that the current data packet passes the secondary filtering strategy, wherein the target filter field includes a source port number, a target port number, a source address, a target address, and a physical address field.
5. The firewall according to claim 4, characterized in that: The control device is further configured to: When the target filtering field of the current data does not belong to the filtering field set, the current data packet is discarded.
6. The firewall according to claim 4, characterized in that: The firewall further comprises a content addressable memory, wherein the filter field set is stored in the content addressable memory; The control device is configured to: In the process of determining whether the target filter field of the current data belongs to a filter field set, sending the target filter field of the current data to the content addressable memory; When the content addressable memory is received and determines that it stores the target filter field of the current data, the storage location of the target filter field is returned to determine whether the target filter field of the current data belongs to a filter field set.
7. The firewall according to claim 1, characterized in that: The hardware firewall also includes a first buffer memory and a second buffer memory; The control device is configured to: In the process of transmitting the data packets passing the secondary filtering strategy to the intranet, the data packets passing the secondary filtering strategy are polled and written into the first buffer memory and the second buffer memory. The data packets in the first buffer memory and the second buffer memory are data packets that are allowed to be read by any node in the intranet.
8. The firewall according to claim 7, characterized in that: The first buffer memory and the second buffer memory are also used to receive any data packet sent from the intranet.
9. The firewall according to claim 8, characterized in that: The control device is further configured to: polling and reading any data packet sent from the intranet in the first buffer memory or the second buffer memory; Apply a sending filtering strategy to any sent data packet; The sending data packets that pass the sending filtering policy are transmitted to the external network.
10. The firewall according to claim 9, characterized in that: When the control device is configured to perform a transmission filtering strategy on any transmitted data packet, it includes: The control device is configured to: Parse any sent data packet to generate a target filter field for the sent data packet; Determine whether the target filter field of the sent data packet belongs to a filter field set; When the target filtering field of the sent data packet belongs to the filtering field set, it indicates that the sent data packet passes the sending filtering policy; The target filtering field includes a source port number, a target port number, a source address, a target address, and a physical address field.
11. The firewall according to any one of claims 1 to 10, characterized in that: The control device includes a management processor, a first processor and a second processor; The management processor is configured to receive a current data packet from an external network and send a first processing instruction to the first processor, wherein the first processing instruction carries a header field of the current data packet; The first processor is configured to execute a preliminary filtering strategy on the header field of the current data packet in response to the first processing instruction, and send a continue sending instruction to the management processor when the current data packet passes the preliminary filtering strategy; The management processor is configured to send the current data packet to the second processor in response to the continue sending instruction; The second processor is configured to execute a secondary filtering policy on the current data packet when receiving the current data packet, and transmit the current data packet that passes the secondary filtering policy to the intranet.
12. The firewall according to claim 11, characterized in that: The second processor is configured to read any transmission data packet from the intranet, perform a transmission filtering policy on any transmission data packet, and send a data transmission interrupt to the management processor after the transmission data packet passes the transmission filtering policy; The management processor is configured to send the transmission data packet to an external network in response to the data transmission interruption.
13. The firewall according to claim 1, characterized in that: The control device is configured to: In response to the firewall mode change instruction, obtaining a changed firewall security protection mode, and changing the current firewall security protection mode to the changed firewall security protection mode; The firewall security and fire protection mode includes multiple filtering strategies for any current data packet and the execution order of the multiple filtering strategies.
14. The firewall according to claim 12, characterized in that: The control device is further configured to: Before responding to the firewall mode change instruction, a security check is performed on the received firewall mode change instruction, and when the firewall mode change instruction passes the security check, the firewall mode change instruction is responded to.
15. The firewall according to claim 13, characterized in that: The control device is further configured to: When the firewall mode change instruction fails to pass the security check, a security warning message is sent to any node in the intranet, and the security warning message is used to prompt that there is currently a firewall mode change instruction that fails to pass the security check.
16. A server cluster, characterized in that: The server cluster includes multiple server nodes, and any server node is provided with a hardware firewall as described in any one of claims 1-15.
17. A data filtering method, characterized in that: Applied to the hardware firewall according to any one of claims 1 to 15, the method comprises: Receiving a current data packet from an external network, and executing a preliminary filtering strategy on a header field of the current data packet; When the preliminary filtering strategy is passed, a secondary filtering strategy is executed on the current data packet; The current data packet that passes the secondary filtering strategy is transmitted to the intranet.
18. A computer device, characterized in that: include: At least one processor, and a memory storing a computer program executable on the processor, wherein the processor executes the data filtering method of claim 17 when executing the computer program.
19. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program, when executed by a processor, performs the data filtering method of claim 17 .
20. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the data filtering method of claim 17 is implemented.
Citation Information
Patent Citations
Network processor and message processing method
CN102780620A
System and processing method based on IPSec hardware firewall in IPv6
CN104168295A
Industrial network distributed data acquisition method and device, electronic equipment and medium
CN114125083A
Network device and method for exchange, routing and / or gateway of data
CN116569533A
Cited By
Method for maintaining gatekeeper safety data transmission based on intrusion detection system and firewall
CN120017422A
