A server external protection method and device

By analyzing and matching the IP addresses in network messages, acquiring and applying security protection policies, and automatically processing network messages, the existing external protection solutions are solved, and efficient protection of intranet servers is achieved and security management.

CN115459944BActive Publication Date: 2024-11-12NEW H3C SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210899453.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2024-11-12
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

The existing outreach protection solutions are inefficient and have high maintenance pressure, so they cannot effectively detect and protect the abnormal outreach behavior of intranet servers, especially when the number of servers increases, it is difficult to meet the increasingly serious network security needs.

Method used

By receiving network messages sent by the intranet server, analyzing the IP addresses in the message information, matching the pre-learned protection policy table, obtaining corresponding security protection policies, and processing messages based on the policy to achieve automated protection measure.

Benefits of technology

It realizes effective protection of intranet servers, reduces manual participation, saves labor costs, and improves the detection and protection efficiency of network security equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115459944B_ABST
    Figure CN115459944B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for external protection of a server, which is set in a network security device. The method is: receiving a network message sent externally by a target server in an intranet; parsing message information from the network message, the message information including the first IP address of the target server; using the first IP address to match the first protection policy table learned in advance, the first protection policy table including the learned IP addresses of the servers included in the intranet; when the first IP address hits the first protection policy table, obtaining the second protection policy table pointed to by the first IP address, the second protection policy table including the IP address of the host accessed by the target server and the corresponding security protection policy; according to the second IP address of the target host in the message information, determining the security protection policy corresponding to the target host in the second protection policy table; and performing protection processing on the network message according to the determined security protection policy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method and device for external connection protection of a server. Background Art

[0002] As network attacks become more and more serious, customers are paying more and more attention to the protection of intranet servers. Especially with the expansion of the number of internal servers and the deterioration of the external network environment, there is an urgent need for solutions to protect servers from abnormal external connections. By monitoring the illegal external connection behavior of the server, users can detect behaviors such as botnets or continuous penetration of the intranet. The server actively initiates a connection to the outside world, obtains the external connection address, protocol, and port information record of the server connection through self-learning, and selects the learning record information to add to the protection list. The administrator determines the legitimacy of the connection to determine whether an alarm is needed, thereby generating an alarm log or blocking action for traffic behavior control.

[0003] However, the current external protection solutions mainly collect the behavior of internal network servers accessing the external network, and then rely on IT information personnel to manually screen, alarm, sample and set policies for external protection. However, this method is inefficient and has high maintenance pressure, especially in the face of the increasing number of server systems. Not only does it require frequent maintenance of the server system, but even frequent maintenance often does not achieve the desired results. Summary of the invention

[0004] In view of this, the present application provides a method and device for external protection of a server, which are used to effectively protect the server and reduce manual participation.

[0005] Specifically, the present application is implemented through the following technical solutions:

[0006] According to a first aspect of the present application, there is provided a server external protection method, which is applied to a network security device, and the method comprises:

[0007] Receive network messages sent by the target server in the intranet;

[0008] Parsing message information from the network message, the message information including the first IP address of the target server;

[0009] Using the first IP address to match a pre-learned first protection strategy table, the first protection strategy table includes the learned IP addresses of servers included in the intranet;

[0010] When the first IP address hits the first protection policy table, obtaining the second protection policy table pointed to by the first IP address, the second protection policy table including the IP address of the host accessed by the target server and the corresponding security protection policy;

[0011] Determine, according to the second IP address of the target host in the message information, the security protection policy corresponding to the target host in the second protection policy table;

[0012] The network message is protected according to the determined security protection strategy.

[0013] According to a second aspect of the present application, there is provided an external protection device for a server, which is arranged in a network security device, and the device comprises:

[0014] A receiving module is used to receive network messages sent by the target server in the intranet.

[0015] A parsing module, used for parsing message information from the network message, wherein the message information includes a first IP address of the target server;

[0016] A matching module, configured to match a pre-learned first protection strategy table using the first IP address, wherein the first protection strategy table includes the learned IP addresses of servers included in the intranet;

[0017] an acquisition module, configured to acquire, when the matching result of the matching module is that the first IP address hits the first protection policy table, a second protection policy table pointed to by the first IP address, wherein the second protection policy table includes the IP address of the host accessed by the target server and the corresponding security protection policy;

[0018] A determination module, configured to determine, according to the second IP address of the target host in the message information, the security protection policy corresponding to the target host in the second protection policy table;

[0019] The protection module is used to perform protection processing on the network message according to the determined security protection strategy.

[0020] According to the third aspect of the present application, an electronic device is provided, including a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program that can be executed by the processor, and the processor is prompted by the computer program to execute the method provided in the first aspect of the embodiment of the present application.

[0021] According to the fourth aspect of the present application, a machine-readable storage medium is provided, which stores a computer program. When called and executed by a processor, the computer program prompts the processor to execute the method provided in the first aspect of the embodiment of the present application.

[0022] Beneficial effects of the embodiments of the present application:

[0023] The embodiment of the present application provides an external connection protection method for a server provided by the present application. After the network security device receives a network message sent externally by a target server in the intranet, it parses the message information from the network message, and then uses the first IP address in the message information to match the pre-learned first protection policy table. Since the first protection policy table includes the learned IP address of the server included in the intranet, when the network security device confirms that the first IP address hits the first protection policy table, it can obtain the second protection policy table pointed to by the first IP address. Since the second protection policy table includes the IP address of the host accessed by the target server and the corresponding security protection policy, the network security device can determine the security protection policy corresponding to the target host in the second protection policy table according to the second IP address of the target host; and then, according to the determined security protection policy, the network message can be protected and processed, thereby realizing the detection of abnormal protection of the server in the intranet, and then realizing effective protection of the server, while reducing manual participation and saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flow chart of an external connection protection method for a server provided in an embodiment of the present application;

[0025] Figure 2 It is a schematic diagram of a data linked list provided in an embodiment of the present application;

[0026] Figure 3 It is a structural schematic diagram of an external protection device for a server provided in an embodiment of the present application;

[0027] Figure 4 It is a hardware structure diagram of an electronic device for implementing an external protection method for a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.

[0029] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0030] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0031] The following is a detailed description of the server protection method provided by this application.

[0032] See also Figure 1 , Figure 1 This is a flow chart of an external connection protection method for a server provided by the present application. The method can be applied to a network security device. When the network security device implements the method, the following steps may be included:

[0033] S101, receiving a network message sent externally by a target server in the intranet.

[0034] In this step, each server located in the intranet often has the need to interact with devices in the external network. Therefore, in order to ensure the security of the server's external connection, it is proposed to detect the network messages sent by the server to the external network, that is, to perform server external connection protection, thereby ensuring the security of the server. In view of this, when the network security device receives the network message sent by the server to the outside, it will execute the server external connection protection process provided by this embodiment. For the convenience of description, the target server accessing the target host is used as an example for explanation.

[0035] S102: parse the network message to obtain message information, where the message information includes a first IP address of the target server.

[0036] In this step, after receiving the network message, in order to improve internal security and ensure the security of the server, the network security device will parse and process the network message sent from the server to the external network, thereby parsing the message information and extracting the IP address of the target server, which is recorded as the first IP address.

[0037] S103: Use the first IP address to match a pre-learned first protection strategy table, where the first protection strategy table includes the learned IP addresses of servers included in the intranet.

[0038] In this step, the present application pre-learns a first protection strategy table of a server, and the first protection strategy table records the IP addresses of the servers in the intranet that need to perform external access behaviors. On this basis, after parsing the first IP address of the target server from the network message, the first IP address can be used to match the aforementioned first protection strategy table. When the first protection strategy table includes the first IP address, it indicates that the security protection strategy for the target server to access the external network has been pre-learned, and step S104 is executed. When the first IP address is not included in the first protection strategy table, it indicates that the security protection strategy for the target server to access the external network has not yet been learned. In a possible embodiment, the above network message can be discarded.

[0039] S104. When the first IP address hits the first protection policy table, obtain a second protection policy table pointed to by the first IP address, wherein the second protection policy table includes a security protection policy corresponding to the IP address of the host accessed by the target server.

[0040] In this step, the present application also maintains a second protection policy table corresponding to each server, and the second protection policy table corresponding to each server records the IP addresses of each host accessed by the server and the security protection policy of the server accessing each host. In this way, when it is confirmed that the first IP address is included in the first protection policy table, the second protection policy table pointed to by the first IP address can be obtained.

[0041] S105: Determine the security protection policy of the target host in the second protection policy table according to the second IP address of the target host in the message information.

[0042] In this step, while the network security device resolves the first IP address of the target server in step S102, it can also resolve the IP address of the target host to be accessed by the target server, which is recorded as the second IP address. In this way, after obtaining the second protection policy table, the network security device can determine whether the second protection policy table includes the IP address of the target host to be accessed by the target server, which is recorded as the second IP address. When the second protection policy table includes the second IP address, the security protection policy corresponding to the second IP address in the second protection policy table can be extracted, and the extracted policy is the security protection policy for the target server to access the target host.

[0043] S106: Perform protection processing on the network message according to the determined security protection strategy.

[0044] In this step, after extracting the security protection policy for the target server to access the target host, the security protection policy can be directly used to protect the network message sent by the target server. For example, if the execution action in the security protection policy is to release, the network security device can send the network message to the outside; if the execution action in the security protection policy is to discard, the network security device can discard the network message, and can also generate an alarm message and output it to the user. In this way, the situation in which the security of the internal network cannot be guaranteed due to the insecurity of the external network environment when the server accesses the external host is avoided.

[0045] By implementing the external connection protection method for the server provided in the present application, after the network security device receives the network message sent externally by the target server in the intranet, it parses the message information from the network message, and then uses the first IP address in the message information to match the pre-learned first protection policy table. Since the first protection policy table includes the learned IP address of the server included in the intranet, when the network security device confirms that the first IP address hits the first protection policy table, it can obtain the second protection policy table pointed to by the first IP address. Since the second protection policy table includes the IP address of the host accessed by the target server and the corresponding security protection policy, the network security device can determine the security protection policy corresponding to the target host in the second protection policy table according to the second IP address of the target host; and then, according to the determined security protection policy, the network message can be protected and processed, thereby realizing the detection of abnormal protection of the server in the intranet, and then realizing effective protection of the server, while reducing manual participation and saving labor costs.

[0046] Optionally, based on the above embodiments, the external protection method for the server provided in this embodiment may also include the following process: when the first IP address does not hit the first protection policy table, if it is confirmed that the security protection policy for the target server to access the target host needs to be learned, the first IP address of the target server is added to the first protection policy table, and the learned security protection policy is added to the second protection policy table pointed to by the first IP address; when the second protection policy table does not include the security protection policy of the target host, if it is confirmed that the security protection policy for the target server to access the target host needs to be learned, the learned security protection policy is added to the second protection policy table pointed to by the first IP address; and the network message is processed according to the learned security protection policy.

[0047] Specifically, when the first IP address does not hit the first protection policy table, it indicates that the relevant security protection policy for the target server's external access to the host has not been learned before. At this time, in order to ensure that the server can normally access the legal host and also block the traffic of the server accessing the illegal host, this embodiment proposes that when the first IP address of the target server is not included in the first protection policy table, the first hit result of the miss can be output. In this way, after the user learns the first hit result of the miss, if the security protection policy of the target server needs to be learned, the first policy learning instruction for the target server will be triggered. After receiving the first policy learning instruction, the network security device can execute the process of learning the security protection policy of the target server, and then learn the security protection policy of the target server's external access to each host. In order to perform external protection of the server later, the network security device will write the first IP address of the target server into the first protection policy table; at the same time, create a second protection policy table that the first IP address can reach, and write the security protection policy of the target server accessing each host and the IP address of the host into the second protection policy table created above, and the first IP address of the target server points to the second protection policy table. On this basis, the network security device can obtain the second protection policy table pointed to by the first IP address, and then determine the corresponding security protection policy in the second protection policy table based on the second IP address of the target host, and then perform protection processing on the network messages sent by the server to the outside based on the determined security protection policy, thereby achieving the purpose of actively protecting the server's external messages.

[0048] Similarly, when the first protection policy table includes the first IP address of the target server, but the second protection policy table pointed to by the first IP address does not include the second IP address of the target host, then in order to ensure that the server can normally access the legal host, and at the same time block the traffic of the server accessing the illegal host, thereby improving the security of the intranet, this embodiment also proposes that when the second IP address is not included in the second protection policy table, a second hit result that does not hit can be output. In this way, after the user learns the second hit result that does not hit, if it is necessary to learn the security protection policy of the target server accessing the target host, the second policy learning instruction for the target server accessing the target host will be triggered. In this way, after the network security device receives the second policy learning instruction, it can execute the process of learning the security protection policy of the target server accessing the target host, and then learn the security protection policy of the target server accessing the target host externally. In order to perform external protection of the server later, the network security device will write the learned security protection policy of the target server accessing the target host into the second protection policy table pointed to by the first IP address. After learning the security protection policy for the target server to access the target host, the network security device can protect the network messages sent by the target server based on the learned security protection policy, thereby achieving the purpose of actively protecting the server's external messages.

[0049] Optionally, based on any of the above embodiments, a second protection policy table can be generated according to the following method: obtain a server learning list, the server learning list including the IP addresses of servers that need to be learned; based on the IP addresses in the server learning list, collect message information in the network messages of each server in the server learning list accessing the host; based on the collected message information of each server, determine the security protection policy of the host accessed by the server; based on the learned security protection policies for the server accessing each host, generate the second protection policy table corresponding to the server.

[0050] Specifically, when learning the security protection policy of each server in the intranet, the user will pre-configure the server learning list of the servers to be learned in the network security device, and the server learning list will include the IP addresses of the servers to be learned. When starting the policy learning process, the network security device will obtain the server learning list, and then monitor and collect the network messages sent by the server to the outside according to the IP address of each server in the server learning list, and then extract the message information from each collected network message. Then, based on the collected message information, the security protection policy for the server to access the host is determined.

[0051] When determining the security protection strategy based on the collected message information, in a possible embodiment, the policy rules of each security protection strategy can be pre-configured in the network security device, and then the extracted message information can be used to match the policy rules of each security protection strategy. Then, for the same host, the security protection policies hit by the message information with the destination address of the host are summarized, and the summarized security protection policy is the security protection policy for the server to access the host.

[0052] In another possible embodiment, the security protection policy of the host accessed by the server can be determined based on the collected message information of each server according to the following process: outputting the extracted message information to the user; receiving the security protection policy configured by the user based on the displayed message information.

[0053] Specifically, in order to better meet the user's security protection needs for each server accessing each host, the network security device can display the message information to the user after extracting the message information. Since the message information includes information such as the IP address of the server and the IP address of the host, the user can configure the security protection policy for the server to access the host based on historical experience and needs. After the creation is completed, the network security device can receive the security protection policy for the server to access each host entered by the user to better meet the user's needs.

[0054] It should be noted that the server learning list may also include network information of the host accessed by the server, and the network information may include but is not limited to network segments and address ranges. In this way, the network security device can collect network packets belonging to the network segment and address range based on the network information, and then

[0055] It should be noted that when configuring the server learning list in the network security device, the network security device will have the problem of deduplication to reduce the workload of creating security protection policies. Specifically, in addition to the IP address of the server, the server learning list can also include the server name. Therefore, when deduplication is performed, the server name of the server can be deduplicated. Specifically, the deduplication problem can be solved by creating a hash table. On this basis, when learning security protection policies, quick search can be achieved by server name; and for the configuration of the server IP address, deduplication is performed based on business matching. For example, for servers processing the same business, the security protection policy of the server processing the business can be set to the same when processing the business.

[0056] In addition, in order to improve business processing performance, the server learning list can be implemented in the form of radix tree, that is, all IP address configurations are split into a single IP + network segment on the radix tree, and each IP address corresponds to a tree node. In this way, there is no need to manually traverse the nodes, and there is no need to consider the problem of repeated IP address configurations. You only need to increase the reference count on the radix tree storage structure; although there is a certain amount of memory usage, when the automatic policy learning function is turned off, the memory can be released. Therefore, it will not cause excessive memory usage or long-term memory usage.

[0057] In addition, when performing strategy self-learning, a self-learning record page will be maintained, and the self-learning record page can be set to perform advanced retrieval according to the IP address of the server to achieve the purpose of accurate search; however, the problem of search efficiency may be introduced. In view of this, this embodiment proposes to filter the self-learning records according to the IP address of the server conveniently and quickly. It can be considered that the IP address of each server is used as an independent storage node, and the linked list of storage records and the array for rapid retrieval are mounted under the storage node. At the same time, the IP addresses of all servers are stored using hash. Although such a storage structure will be more complicated, and the server IP needs to be split into a single IP for storage, each storage node is at least 20 bytes, according to 1000 server configurations, each configuration does not exceed 256 IPs (calculated according to a 24-bit mask), and the memory used is nearly 5M, but the search efficiency will be higher, and when displayed, it can naturally support display according to server IP grouping to better realize the advanced search function.

[0058] Optionally, based on any of the above embodiments, the first protection policy table in this embodiment stores the IP addresses of servers in the intranet in the form of a data linked list; the second protection policy table stores the security protection policies for server access to the host in the first protection processing table in the form of a data linked list, wherein each IP address in the first protection policy table points to the IP address and security protection policy of the host accessed by the server corresponding to the IP address in the second protection policy table.

[0059] Specifically, the first protection strategy table can store the IP addresses of the servers in the intranet and correspond to the nodes in the first data linked list, each node stores an IP address, and then each node of the first data linked list will have a pointer, which is used to point to the second data linked list, and the second data linked list is the second protection strategy table that stores the IP addresses of the hosts accessed by the server and the security protection strategies. Figure 2As shown, the IP address of the target server, i.e., IPn, is stored at the 1024th position in the first data linked list, and the IPn points to the second data linked list, which records the security protection policy of the host accessed by the target server and the IP address of the host, etc. In this way, when the security policy is stored in the form of a linked list, when a large number of security protection policies are stored, if the above two data linked lists are used for storage, the search speed of the security protection policy will be greatly improved, thereby improving the protection speed of the server's external protection.

[0060] Optionally, based on any of the above embodiments, the network security device in this embodiment includes a main control board and at least one business board; on this basis, a second protection policy table can be generated by the following method: the main control board sends the server learning list to each business board, so that each business board collects the message information in the network message of each server in the server learning list accessing the host according to the IP address in the server learning list; the main control board receives the message information collected by each business board; and outputs and displays the collected message information; the main control board receives the security protection policy configured by the user according to the displayed message information; and then the main control board generates the second protection policy table corresponding to the server according to the security protection policy of the server accessing each host learned respectively.

[0061] Specifically, when automatically learning security protection strategies, you can implement them as follows:

[0062] Automatic learning configuration parameter description:

[0063] (1) Start action; (start, stop)

[0064] (2) Study duration (1h, 12h, 24h, one week)

[0065] (3) Start date\time, end date\time

[0066] (4) Learning object (server IP list)

[0067] (5) Progress percentage

[0068] On this basis, the process of security protection strategy learning is as follows:

[0069] Start periodic aggregation of learning records. By creating child threads and starting timers, the main control board periodically aggregates the learning records of each business board and displays the normal behavior baseline of the server, providing a basis and reference for users such as IT administrators to add detection strategies for server anomaly protection.

[0070] Send start to start the learning execution process

[0071] (1) If the background mark of the network security device is start, it means that it is learning and no processing is done;

[0072] (2) If the main control board confirms that the server learning list is empty, it will prompt that a specific server learning list needs to be configured;

[0073] (3) The main control board clears the previous learning records and sends the startup learning configuration to the core of each business board. When the traffic passes through the network security device, each business board will match and store the learning records.

[0074] (4) The main control board starts the sub-thread and initializes the timer. The main control board collects all learning records of each business board;

[0075] (5) When the aggregation specification reaches the upper limit, no more aggregation will be performed; the timer periodically updates and checks the current learning progress percentage. If it reaches 100%, it means that the learning time is over, and the action is set to stop. It is sent to the core of each business board to close the timer and sub-thread.

[0076] Issue the stop command to start learning execution process

[0077] (1) If the background flag is stop, no processing is performed.

[0078] (2) Send the stop learning configuration to the core of each service board, and stop the self-learning process.

[0079] (3) Close the timer and child thread.

[0080] Purpose of self-study:

[0081] (1) Server anomaly learning can self-learn the normal behavior baseline of a specified server, and with the confirmation of the IT administrator, add the baseline to the security protection policy of server anomaly protection.

[0082] (2) Server security protection policies are used to identify the external connection behavior of servers under specific conditions. IT administrators define the normal external connection behavior of servers by setting the addresses, protocols and ports allowed for server external connection. All external connection behaviors other than the defined normal external connection behaviors are considered illegal external connections and are processed according to the settings of the server security protection policies. Currently, the device can support the protection of 1,000 server external connection behaviors.

[0083] (3) There are two ways to create a new server anomaly identification security protection policy: normal creation and fast creation. The fast creation is a method that can quickly and automatically add policies in batches based on the self-learning function.

[0084] By implementing the server external connection protection method provided in any of the above embodiments, it is possible to effectively learn all the traffic that actively connects to the outside of the intranet server, thereby obtaining a security protection strategy for server protection, and realizing automated detection, alarm and blocking management of server protection.

[0085] Based on the same inventive concept, the present application also provides an external connection protection device for a server corresponding to the external connection protection method for the server. The implementation of the external connection protection device for the server can refer to the description of the external connection protection method for the server, which will not be discussed here one by one.

[0086] See also Figure 3 , Figure 3 An external protection device for a server provided by an exemplary embodiment of the present application is provided in a network security device, and the device includes:

[0087] Receiving module 301, used to receive network messages sent by the target server in the intranet;

[0088] A parsing module 302, configured to parse the network message to obtain message information, wherein the message information includes a first IP address of the target server;

[0089] A matching module 303, configured to match a pre-learned first protection strategy table using the first IP address, wherein the first protection strategy table includes the learned IP addresses of servers included in the intranet;

[0090] An acquisition module 304 is used to acquire a second protection policy table pointed to by the first IP address when the matching result of the matching module 303 is that the first IP address hits the first protection policy table, wherein the second protection policy table includes the IP address of the host accessed by the target server and the corresponding security protection policy;

[0091] A determination module 305 is used to determine the security protection policy corresponding to the target host in the second protection policy table according to the second IP address of the target host in the message information;

[0092] The protection module 306 is used to perform protection processing on the network message according to the determined security protection strategy.

[0093] Optionally, based on the above embodiment, the external protection device for the server provided in this embodiment further includes:

[0094] A first policy generating module (not shown in the figure), configured to, when the matching result of the matching module is that the first IP address does not hit the first protection policy table, add the first IP address of the target server to the first protection policy table if it is confirmed that the security protection policy for the target server to access the target host needs to be learned, and add the learned security protection policy to the second protection policy table pointed to by the first IP address;

[0095] The first policy generating module (not shown in the figure) is further configured to, when the determining module determines that the second protection policy table does not include the security protection policy of the target host, add the learned security protection policy to the second protection policy table pointed to by the first IP address if it is confirmed that the security protection policy of the target server accessing the target host needs to be learned;

[0096] The protection module 306 is further configured to process the network message according to the learned security protection strategy.

[0097] Optionally, based on any of the above embodiments, the external protection device for the server provided in this embodiment may further include:

[0098] The second policy generation module (not shown in the figure) is used to generate a second protection policy table according to the following method: obtain a server learning list, which includes the IP addresses of servers that need to be learned; based on the IP addresses in the server learning list, collect the message information in the network message of each server in the server learning list accessing the host; based on the collected message information of each server, determine the security protection policy of the host accessed by the server; based on the learned security protection policy of the server accessing each host, generate the second protection policy table corresponding to the server.

[0099] Optionally, based on any of the above embodiments, the first protection policy table in this embodiment stores the IP addresses of servers in the intranet in the form of a data linked list; the second protection policy table stores the security protection policies for server access to the host in the first protection processing table in the form of a data linked list, wherein each IP address in the first protection policy table points to the IP address and security protection policy of the host accessed by the server corresponding to the IP address in the second protection policy table.

[0100] Based on the same inventive concept, an embodiment of the present application provides an electronic device, which can be but is not limited to the above-mentioned network security device. Figure 4As shown, the electronic device includes a processor 401 and a machine-readable storage medium 402, the machine-readable storage medium 402 stores a computer program that can be executed by the processor 401, and the processor 401 is prompted by the computer program to execute the external connection protection method of the server provided in any embodiment of the present application. In addition, the electronic device also includes a communication interface 403 and a communication bus 404, wherein the processor 401, the communication interface 403, and the machine-readable storage medium 402 communicate with each other through the communication bus 404.

[0101] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0102] The communication interface is used for communication between the above electronic device and other devices.

[0103] The machine-readable storage medium 402 may be a memory, which may include a random access memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.

[0104] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0105] As for the electronic device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0106] 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 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 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 device including the elements.

[0107] The implementation process of the functions and effects of each unit / module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0108] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, that is, they may be located in one place, or they may be distributed on multiple network units / modules. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.

[0109] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A server external protection method, characterized in that: Applied to a network security device, the method comprises: Receive network messages sent by the target server in the intranet; Parsing message information from the network message, the message information including the first IP address of the target server; Using the first IP address to match a pre-learned first protection strategy table, the first protection strategy table includes the learned IP addresses of servers included in the intranet; When the first IP address hits the first protection policy table, obtaining the second protection policy table pointed to by the first IP address, the second protection policy table including the IP address of the host accessed by the target server and the corresponding security protection policy; Determine, according to the second IP address of the target host in the message information, the security protection policy corresponding to the target host in the second protection policy table; The network message is protected according to the determined security protection strategy.

2. The method according to claim 1, characterized in that: Also includes: When the first IP address does not hit the first protection policy table, if it is confirmed that the security protection policy for the target server to access the target host needs to be learned, the first IP address of the target server is added to the first protection policy table, and the learned security protection policy is added to the second protection policy table pointed to by the first IP address; When the second protection policy table does not include the security protection policy of the target host, if it is confirmed that the security protection policy of the target server accessing the target host needs to be learned, the learned security protection policy is added to the second protection policy table pointed to by the first IP address; The network message is processed according to the learned security protection strategy.

3. The method according to claim 1, characterized in that Generate the second protection strategy table as follows: Obtain a server learning list, wherein the server learning list includes IP addresses of servers that need to be learned; According to the IP addresses in the server learning list, collecting message information in the network message of each server in the server learning list accessing the host; Determine the security protection strategy of the host accessed by the server based on the collected message information of each server; The second protection policy table corresponding to the server is generated according to the security protection policies learned for the server to access each host.

4. The method according to claim 2, characterized in that: Each network security device includes a main control board and at least one service board; According to the IP addresses in the server learning list, message information in the network message of each server in the server learning list accessing the host is collected, including: The main control board sends the server learning list to each service board, so that each service board collects the message information in the network message of each server in the server learning list accessing the host according to the IP address in the server learning list; The main control board receives the message information collected by each service board; Based on the collected message information of each server, determine the security protection strategy of the host accessed by the server, including: The main control board outputs and displays the collected message information; The main control board receives the security protection strategy configured by the user according to the displayed message information; Generate the second protection strategy table corresponding to the server according to the learned security protection strategy of each host, including: The main control board generates the second protection strategy table corresponding to the server according to the security protection strategy for the server to access each host that has been learned respectively.

5. The method according to claim 1, characterized in that The first protection policy table stores the IP addresses of servers in the intranet in the form of a data linked list; the second protection policy table stores the security protection policies for servers accessing hosts in the first protection policy table in the form of a data linked list, wherein each IP address in the first protection policy table points to the IP address and security protection policy of the host accessed by the server corresponding to the IP address in the second protection policy table.

6. An external protection device for a server, characterized in that: The device is arranged in a network security device, and comprises: A receiving module is used to receive network messages sent by the target server in the intranet. A parsing module, used for parsing message information from the network message, wherein the message information includes a first IP address of the target server; A matching module, configured to match a pre-learned first protection strategy table using the first IP address, wherein the first protection strategy table includes the learned IP addresses of servers included in the intranet; an acquisition module, configured to acquire, when the matching result of the matching module is that the first IP address hits the first protection policy table, a second protection policy table pointed to by the first IP address, wherein the second protection policy table includes the IP address of the host accessed by the target server and the corresponding security protection policy; A determination module, configured to determine, according to the second IP address of the target host in the message information, the security protection policy corresponding to the target host in the second protection policy table; The protection module is used to perform protection processing on the network message according to the determined security protection strategy.

7. The device according to claim 6, characterized in that Also includes: A first policy generating module is configured to, when the matching result of the matching module is that the first IP address does not hit the first protection policy table, if it is confirmed that it is necessary to learn the security protection policy for the target server to access the target host, add the first IP address of the target server to the first protection policy table, and add the learned security protection policy to the second protection policy table pointed to by the first IP address; The first policy generating module is further configured to, when the determining module determines that the second protection policy table does not include the security protection policy of the target host, add the learned security protection policy to the second protection policy table pointed to by the first IP address if it is confirmed that the security protection policy of the target server accessing the target host needs to be learned; The protection module is further used to process the network message according to the learned security protection strategy.

8. The device according to claim 6, characterized in that Also includes: The second strategy generating module is used to generate a second protection strategy table according to the following method: obtaining a server learning list, wherein the server learning list includes IP addresses of servers that need to be learned; According to the IP addresses in the server learning list, collect the message information in the network messages of each server in the server learning list accessing the host; determine the security protection policy of the host accessed by the server based on the collected message information of each server; and generate the second protection policy table corresponding to the server based on the security protection policy of the server accessing each host learned separately.

9. The device according to claim 6, characterized in that The first protection policy table stores the IP addresses of servers in the intranet in the form of a data linked list; the second protection policy table stores the security protection policies for servers accessing hosts in the first protection policy table in the form of a data linked list, wherein each IP address in the first protection policy table points to the IP address and security protection policy of the host accessed by the server corresponding to the IP address in the second protection policy table.