A method for implementing public cloud network traffic security

By using custom security policies and index value allocation algorithms, the problem of traffic security between VPCs and between VPCs and external networks in public cloud networks has been solved, achieving bidirectional communication and secure protection of network traffic, and optimizing the use of index values.

CN115842664BActive Publication Date: 2024-11-05UNICLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211479035.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-23
Publication Date
2024-11-05
Estimated Expiration
2042-11-23

AI Technical Summary

Technical Problem

How to effectively ensure network traffic security between VPCs and between VPCs and external networks in public cloud networks, especially addressing the issue of inadequate inter-domain policy priority functionality in existing firewall technologies.

Method used

By using user-defined security policies, leveraging firewall inter-domain policies and index value allocation algorithms, security policies are reordered and distributed to enhance security protection between VPCs and between VPCs and external networks. External VPN instances are used as relays to achieve bidirectional communication, and index values ​​are reclaimed when policies are deleted to reduce the amount of device rules used.

Benefits of technology

It enables bidirectional secure communication between VPCs and between VPCs and external networks, enhances network traffic security, avoids the problem of poor inter-domain policy priority function of firewalls, and optimizes the efficiency of index value usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115842664B_ABST
    Figure CN115842664B_ABST
Patent Text Reader

Abstract

The present invention provides a method for implementing public cloud network traffic security. When a user has a demand for traffic security between VPCs or between VPCs and networks outside the cloud, one or more security policies can be created, and the five-tuple and priority of the security policy and the execution action can be configured. When the user no longer needs the security policy, the security policy can be deleted. When the VPC is not bound to any security policy, the VPC will restore the default full release rule so that the VPC will no longer perform security protection. Beneficial effects of the present invention: A method for implementing public cloud network traffic security, which uses firewall inter-domain policies to achieve the purpose of adding security policies when VPCs communicate with VPCs or between VPCs and networks outside the cloud, thereby ensuring the security of network traffic in and out of the VPC.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of public cloud networks, and in particular relates to a method for implementing public cloud network traffic security. Background Art

[0002] A virtual private cloud (VPC) is a dynamically configured pool of public cloud computing resources that requires the use of encryption protocols, tunneling protocols, and other security programs. A VPC basically turns the provider's multi-tenant architecture into a single-tenant architecture. VPC builds an isolated, user-configured and managed virtual network environment for elastic cloud servers, improves the security of user cloud resources, and simplifies user network deployment. VPC is a basic cloud network environment that users purchase and build from cloud vendors. Through VPC, users can safely, conveniently, and quickly configure and manage internal networks, customize many network products and configurations, and build a network topology exclusive to them according to their needs.

[0003] VPC provides users with a dedicated network environment, which can flexibly configure the network and cloud servers inside the VPC, and well meet the needs of users for elastic network and network security. However, as a user's private network environment, how to ensure the security of network traffic is a big problem. Summary of the invention

[0004] In view of this, the present invention aims to propose a method for implementing public cloud network traffic security, so that users can configure security policies by themselves and use cloud firewalls to implement security protection and restriction of VPC-to-VPC north-south traffic and VPC-to-Internet network (out-of-cloud network) traffic.

[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:

[0006] A method for implementing public cloud network traffic security, characterized by:

[0007] The user creates a security policy and specifies the source VPC and destination VPC;

[0008] Based on the security policy created by the user, the program checks whether the source and destination VPCs have security policies. If yes, they are re-ordered in priority order and sent to the firewall's inter-zone policy. If no, the VPC's default inter-zone policy rule of full release is deleted, and then the created security policy is sent to the inter-zone policy. The security policy index value is assigned according to the index value algorithm.

[0009] When a user deletes a security policy, the security policy rules are deleted first, the index value is recovered, and then a query is made to see whether there is still a security policy under the same VPC. If so, no further operation is performed. If it is the last security policy of the VPC, the VPC default full release security policy needs to be restored while deleting the security policy created by the user.

[0010] Furthermore, the intercommunication strategy between VPCs is as follows:

[0011] A1. First, create security policies for VPC1 and VPC2, and then proceed to steps A2 and A5.

[0012] A2. Determine whether VpcZone1-EXTERNAL has created security policy rules. If yes, proceed to step A3; otherwise, proceed to step A4;

[0013] A3, the current security policy and the existing security policies are sorted by priority to form a new security policy list, and then proceed to step A8;

[0014] A4. Delete the default VpcZone1-EXTERNAL and inter-zone policies of VPC1, add the new policy to the list of security policies to be issued, and then proceed to step A8.

[0015] A5. Determine whether EXTERNAL-VpcZone2 has created security policy rules. If yes, proceed to step A6; otherwise, proceed to step A7.

[0016] A6. The current security policy and the existing security policies are sorted by priority to form a new security policy list, and then proceed to step A8;

[0017] A7. Delete the default VpcZone1-EXTERNAL and inter-zone policies of VPC1, add the new policy to the list of security policies to be issued, and then proceed to step A8.

[0018] A8. Send the latest and most ordered security policy list to the device in batches;

[0019] A9. Wait for the device to return the configuration result and then determine whether the device configuration is successful. If successful, return the final result and then end. Otherwise, retry to resend the configuration to the device and wait for the device to return the configuration result again.

[0020] Furthermore, the intercommunication strategy between VPC and external cloud networks is as follows:

[0021] B1. Create a security policy from VPC1 to the external network.

[0022] B2. Determine whether VpcZone1-EXTERNAL has created security policy rules. If not, proceed to step B3; otherwise, proceed to step B4.

[0023] B3. Delete the default VpcZone1-EXTERNAL and inter-zone policy of VPC1, add the new policy to the list of security policies to be issued, and then go to step B5.

[0024] B4. The current security policy is sorted together with the existing security policies according to their priorities to form a new security policy list;

[0025] B5. Send the latest and most ordered security policy list to the device in batches;

[0026] B6. Wait for the device to return the configuration result;

[0027] B7. Determine whether the device configuration is successful. If so, return the final result and end. Otherwise, retry to resend the configuration to the device and wait for the device to return the configuration result.

[0028] Furthermore, the security policy index value allocation process is as follows:

[0029] C1, request to allocate index value;

[0030] C2, determine whether there is an index range, if not, proceed to step C3, otherwise proceed to C4;

[0031] C3, after reporting an error, an exception is thrown and the process ends;

[0032] C4, determine whether the security policy index has been assigned to the same domain, if not, proceed to step C5, otherwise proceed to step C6;

[0033] C5. Use the minimum value of the index range as the allocation value and set it to the allocated state, then return the index value and end;

[0034] C6. Take the maximum index value that has been allocated in the same domain, and use the maximum index value + 1 as the allocated index value;

[0035] C7, determine whether the assigned index value is within the index value range, if yes, return the index value and end, otherwise proceed to step C8;

[0036] C8. Take the smallest value from the recovered index values ​​as the final index value, set this index value to the allocated and returned index value, and then end.

[0037] Furthermore, the present solution discloses an electronic device, comprising a processor and a memory that is communicatively connected to the processor and is used to store executable instructions of the processor, wherein the processor is used to execute a method for implementing public cloud network traffic security.

[0038] Furthermore, the present solution discloses a server comprising at least one processor and a memory communicatively connected to the processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes a method for implementing public cloud network traffic security.

[0039] Furthermore, the present solution discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for implementing public cloud network traffic security.

[0040] Compared with the prior art, the method for implementing public cloud network traffic security described in the present invention has the following beneficial effects:

[0041] (1) A method for implementing public cloud network traffic security described in the present invention uses firewall inter-domain policies to achieve the purpose of adding security policies when VPCs communicate with each other, and when VPCs communicate with networks outside the cloud, thereby ensuring the security of network traffic entering and leaving the VPC;

[0042] (2) In the method for implementing public cloud network traffic security described in the present invention, the firewall inter-domain policy does not support the priority function. The earlier the priority, the higher the priority. The index value allocation algorithm is used to bind the index value to the security policy priority. After sorting by priority, the configuration is sent to the device in order, thereby avoiding the problem that the inter-domain policy priority function before the firewall is not working well.

[0043] (3) The method for implementing public cloud network traffic security described in the present invention cleverly adds an external_vpn VPN instance for external networks as a transit, which can achieve compatibility between VPCs and VPCs, and between VPCs and networks outside the cloud;

[0044] (4) In the method for implementing public cloud network traffic security described in the present invention, after the security policy is deleted, the index value can be recycled and wait to be used again, which narrows the range of the index value and reduces the usage of rule IDs on the device. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:

[0046] Figure 1It is the overall topology diagram of the VPC network, which systematically illustrates the overall network topology structure of VPC inbound and outbound traffic;

[0047] Figure 2 This is a flowchart of the security policy interconnection between VPCs, which explains the process of creating security policies between VPCs.

[0048] Figure 3 This is a flowchart of the security policy communication between VPC and external networks, which explains the process of creating security policies between VPC and external networks.

[0049] Figure 4 It is a flow chart of allocating security policy index values, which illustrates the allocation algorithm and allocation process of security policy index values. DETAILED DESCRIPTION

[0050] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0051] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0052] This solution uses the inter-zone policy between the configured firewall security zones to control the incoming or outgoing traffic of the VPC.

[0053] The overall topology of the VPC network is as follows: Figure 1 As shown:

[0054] First, the overall topology of the VPC network. The virtual machines purchased by users are installed on CVK. The traffic from the virtual machines to the Internet network reaches the Leaf switch through CVK, and then is sent to the Border switch. After passing through the firewall FW, all VPC vpn instances (a mark to identify VPC) are converted into a unified external-vpn on the firewall to access the Internet network. After passing through the FW, the traffic returns to the Border switch. After passing through the Border switch again, it has left the VPC in the cloud, and finally is sent to the InternetAcc switch and router to reach the Internet network. The process of the Internet network accessing the VPC virtual machine is the opposite of the process of the virtual machine going out. After passing through the router and InternetAcc switch to the Border switch, it passes through the FW again. On the FW, the external-vpn is converted into the VPC vpn instance, and then returned to the Border switch. The Border switch then gives it to the Leaf switch, and the Leaf switch forwards the traffic to the virtual machines in CVK.

[0055] The security domain corresponding to the VPN instance of external-vpn on FW is EXTERNAL. Assume that the security domain corresponding to VPC is VpcZone. The default inter-zone policy of VPC is full release, that is, the security policy rules under VpcZone-EXTERNAL and EXTERNAL-VpcZone are all pass. There is no restriction on the outbound and inbound traffic of the virtual machines in VPC, which can easily cause network security problems.

[0056] This solution uses the role and function of the EXTERNAL security domain and VpcZone-EXTERNAL and EXTERNAL-VpcZone inter-domain policies to manage the traffic in and out of the VPC.

[0057] The following is a specific implementation plan:

[0058] 1. Scenarios of secure communication between different VPCs (such as Figure 2 (shown)

[0059] When east-west traffic is interconnected between different VPCs, a combination of peers and security groups can be used to limit traffic and ensure security. This solution mainly involves north-south traffic security. When north-south traffic is interconnected between VPCs, the prerequisite is that the virtual machine needs to be bound to an elastic public IP (EIP) to ensure that the traffic can reach the FW smoothly, and then the security policy is restricted.

[0060] Assume that there are two VPCs, VPC1 and VPC2. The original VpcZone-EXTERNAL and EXTERNAL-VpcZone of the two VPCs are both allowed by default. When VPC1 is added to access VPC2 and a security policy is added, the default pass rules in VpcZone1-EXTERNAL and EXTERNAL-VpcZone2 are deleted, and the security policy rules are sent to VpcZone1-EXTERNAL and EXTERNAL-VpcZone2. EXTERNAL is used as a transit point, and the security policy It is one-way. After the policy from VPC1 to VPC2 is created, VPC1 and VPC2 are not connected to the cloud network by default. When the policy rule is pass, the traffic from VPC1 to VPC2 is allowed to pass, but the return packet traffic from VPC2 is still not allowed to pass. Therefore, at this time, the virtual machine in VPC1 cannot access the virtual machine in VPC2. If you want to have two-way access, you need to create another release rule from VPC2 to VPC1. At this time, the inter-domain policies of VpcZone2-EXTERNAL and EXTERNAL-VpcZone1 are released, and VPC1 and VPC2 can communicate in both directions.

[0061] 2. Scenarios of secure intercommunication between VPC and external cloud networks (such as Figure 3(shown)

[0062] Assume that VPC1 is interconnected with the network outside the cloud. It does not need to be as complicated as the interconnection between VPCs, because VPC accesses outside the cloud through the EXTERNAL domain. Therefore, for VPC1 to access outside the cloud, it is necessary to delete the default pass rule under VpcZone1-EXTERNAL, and at the same time issue the security policy rule for the address outside the cloud to allow it to pass. When the cloud outside accesses VPC1, delete the default pass inter-domain policy of EXTERNAL-VpcZone1, and configure the security policy rule for allowing the address outside the cloud to the VPC address. In this way, VPC1 and the network outside the cloud can achieve two-way interconnection.

[0063] 3. Scenarios when VPCs are combined with VPCs or VPCs are combined with off-cloud networks

[0064] When VPC1 is interconnected with both VPC2 and the network outside the cloud, you only need to take VPC1 as the center, delete the default pass rule under the inter-domain policy VpcZone1-EXTERNAL of the outbound VPC, and delete the default pass security policy rule under the inter-domain policy EXTERNAL-VpcZone1 of the inbound VPC. At the same time, configure the source and destination of VpcZone1-EXTERNAL and EXTERNAL-VpcZone1 respectively, and the source and destination are VPC2, and the inter-domain policy rules of the network address outside the cloud can ensure that VPC1 can be interconnected with VPC2 and that VPC1 can communicate with the network address outside the cloud.

[0065] 4. Security policy rule configuration

[0066] To allow or deny specific addresses, you can configure the five-tuple (source IP, source port, destination IP, destination port, network protocol) rules in the security policy. The priority of the security policy is that the higher the order, the higher the priority in the same domain on the device, so it is necessary to ensure that the higher the priority, the higher the order, and the security policy rules can be moved.

[0067] 5. Security policy index value allocation algorithm (such as Figure 4 (shown)

[0068] First, save a rule index allocation table in the database. The rule index needs to set a range. The same source and destination are considered as the same group. The index values ​​allocated in each group cannot be the same. Each security policy has a unique index value corresponding to the same domain. When allocating an index, first check whether the range exists. If it exists, check whether it has been allocated. If it has, take the maximum value in the allocated index. The allocated index value is the maximum value + 1, and it is set to the allocated state. If it has not been allocated, the starting value of the range is the index value, and it is set to the allocated state. After deleting the security policy, the index value is recycled and set to the recycled state. If the maximum value + 1 exceeds the maximum value of the range during allocation, take the smallest index value from the recycled index value as the allocated index value, and set it to the allocated state.

[0069] Specific implementation process description:

[0070] Business process:

[0071] 1. The user creates a security policy and specifies the source VPC (IP address) and destination VPC (IP address).

[0072] 2. The program checks whether the source and destination VPCs have security policies based on the security policies created by the user. If so, they are re-ordered in priority order and sent to the firewall's inter-domain policy. If not, the VPC's default inter-domain policy rule of full release is deleted, and the created security policy is sent to the inter-domain policy. The security policy index value is assigned according to the index value algorithm.

[0073] When a user deletes a security policy, the security policy rules are first deleted and the index value is recovered. Then a query is made to see whether there is still a security policy under the same VPC. If so, no further operation is performed. If it is the last security policy of the VPC, the VPC default full-release security policy needs to be restored while deleting the security policy created by the user.

[0074] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0075] In the several embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. For example, the division of the units described above is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The above-mentioned units may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.

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

Claims

1. A method for implementing public cloud network traffic security. Features: The user creates a security policy and specifies the source VPC and destination VPC; Based on the security policy created by the user, the program checks whether the source and destination VPCs have security policies. If yes, they are re-ordered in priority order and sent to the firewall's inter-zone policy. If no, the VPC's default inter-zone policy rule of full release is deleted, and then the created security policy is sent to the inter-zone policy. The security policy index value is assigned according to the index value algorithm. When a user deletes a security policy, the security policy rules are first deleted and the index value is recovered. Then the user checks whether there is still a security policy under the same VPC. If so, no further operation is performed. If it is the last security policy of the VPC, the user-created security policy must be deleted and the VPC default full release security policy must be restored at the same time. The intercommunication strategy between VPCs is as follows: A1. First, create security policies for VPC1 and VPC2, and then proceed to steps A2 and A5. A2. Determine whether VpcZone1-EXTERNAL has created security policy rules. If yes, proceed to step A3; otherwise, proceed to step A4; A3, the current security policy and the existing security policies are sorted by priority to form a new security policy list, and then step A8 is performed; A4. Delete the default VpcZone1-EXTERNAL and inter-zone policies of VPC1, add the new policy to the list of security policies to be issued, and then proceed to step A8. A5. Determine whether EXTERNAL-VpcZone2 has created security policy rules. If yes, proceed to step A6; otherwise, proceed to step A7. A6. The current security policy and the existing security policies are sorted by priority to form a new security policy list, and then proceed to step A8; A7. Delete the default VpcZone1-EXTERNAL and inter-zone policies of VPC1, add the new policy to the list of security policies to be issued, and then proceed to step A8. A8. Send the latest and most ordered security policy list to the device in batches; A9. Wait for the device to return the configuration result and then determine whether the device configuration is successful. If successful, return the final result and then end. Otherwise, retry to resend the configuration to the device and wait for the device to return the configuration result again. The interconnection strategy between VPC and external cloud networks is as follows: B1. Create a security policy from VPC1 to the external network. B2. Determine whether VpcZone1-EXTERNAL has created security policy rules. If not, proceed to step B3; otherwise, proceed to step B4. B3. Delete the default VpcZone1-EXTERNAL and inter-zone policy of VPC1, add the new policy to the list of security policies to be issued, and then go to step B5. B4. The current security policy is sorted together with the existing security policies according to their priorities to form a new security policy list; B5. Send the latest and most ordered security policy list to the device in batches; B6. Wait for the device to return the configuration result; B7. Determine whether the device configuration is successful. If yes, return the final result and then end. Otherwise, retry to resend the configuration to the device and wait for the device to return the configuration result again. The security policy index value allocation process is as follows: C1, request to allocate index value; C2, determine whether there is an index range, if not, proceed to step C3, otherwise proceed to C4; C3, after reporting an error, an exception is thrown and the process ends; C4, determine whether the security policy index has been assigned to the same domain, if not, proceed to step C5, otherwise proceed to step C6; C5. Use the minimum value of the index range as the allocation value and set it to the allocated state, then return the index value and end; C6. Take the maximum index value that has been allocated in the same domain, and use the maximum index value + 1 as the allocated index value; C7, determine whether the assigned index value is within the index value range, if yes, return the index value and end, otherwise proceed to step C8; C8. Take the smallest value from the recovered index values ​​as the final index value, set this index value to the allocated and returned index value, and then end.

2. An electronic device comprising a processor and a memory connected to the processor for storing instructions executable by the processor, Features: The processor is used to execute the method for implementing public cloud network traffic security as described in claim 1 above.

3. A server, Features: It includes at least one processor and a memory that is communicatively connected to the processor, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the processor so that the at least one processor executes a method for implementing public cloud network traffic security as described in claim 1.

4. A computer-readable storage medium storing a computer program, Features: When the computer program is executed by a processor, the method for implementing public cloud network traffic security as described in claim 1 is implemented.