Virtual machine secure communication method and computing node

By creating traffic diversion Vlans and SuperVlans on OpenStack computing nodes, and using virtual firewalls for traffic marking and conversion, the problem of east-west traffic protection between virtual machines in the cloud computing environment is solved, and the security of virtual machine communication is improved and malicious code is diffused. of prevention.

CN115396160BActive Publication Date: 2024-10-29NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210945171.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-08
Publication Date
2024-10-29
Estimated Expiration
2042-08-08

AI Technical Summary

Technical Problem

In a cloud computing environment, existing technologies are difficult to effectively protect east-west traffic between virtual machines, leading to increased risks of malicious code proliferation and advanced persistent threat attacks.

Method used

Adopt the virtual machine secure communication method of OpenStack computing nodes, create traffic diversion VLANs and SuperVlans, and use virtual firewalls for traffic marking and conversion to ensure that communication traffic between virtual machines undergoes security inspection through the virtual firewall.

Benefits of technology

It realizes east-west traffic protection between virtual machines, prevents the spread of malicious code, enhances the security of virtual machine communication, and reduces the risk of advanced persistent threats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115396160B_ABST
    Figure CN115396160B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of network security technology, and in particular to a virtual machine secure communication method and computing node, the method comprising: determining a target virtual machine under a target Vlan on a first virtual switch; creating a diversion Vlan on a third virtual switch, disconnecting the target virtual machine from the target Vlan, and connecting the target virtual machine to the diversion Vlan; in a virtual firewall, the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated to the same SuperVlan; the target virtual machine communicates with virtual machines under each sub-Vlan associated in the SuperVlan through the third virtual switch and the virtual firewall. The present disclosure can realize the protection of east-west traffic between virtual machines in a cloud computing scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network security technology, and in particular to a virtual machine secure communication method and a computing node. Background Art

[0002] With the development of network technology, cloud computing is being adopted by more and more enterprises. The relevant technical characteristics of cloud computing and its application mode are blurring the network boundary, which makes the demand for boundary security protection in cloud computing scenarios different from that in traditional application scenarios.

[0003] In a cloud computing environment, computing resources (virtual machines) are highly concentrated and have the property of dynamic migration, which can easily cross the established security boundaries. Once the protection of the security boundary is breached, malicious codes such as worm viruses can easily spread from the infected virtual machine to other virtual machines in the LAN. Or the infected virtual machine will be used as a meat machine, allowing attackers to unscrupulously invade other virtual machines in the LAN, which will then evolve into an APT (Advanced Persistent Threat) attack, causing greater damage to the virtual machines in the LAN.

[0004] In the prior art, for cloud data centers, traditional physical firewalls are directly deployed in data centers, such as Figure 1 As shown in the figure, this can solve the protection of north-south traffic in and out of the data center, but it cannot solve the protection of east-west traffic between virtual machines in the data center. When virtual machines belonging to different network segments communicate, the traffic sent by the virtual machines needs to be transferred to the firewall outside the host, filtered, and then returned to the destination virtual machine inside the host. When virtual machines belonging to the same network segment communicate, the traffic sent by the virtual machines is forwarded inside the virtual switch and can be sent directly to the destination virtual machine. The firewall outside the host cannot obtain it at all, and security protection is out of the question. Summary of the invention

[0005] The purpose of the present disclosure is to provide a virtual machine secure communication method and computing node, which can realize the protection of east-west traffic.

[0006] In order to achieve the above-mentioned object, the present disclosure provides a virtual machine secure communication method, which is applied to an OpenStack computing node, wherein the OpenStack computing node includes a first virtual switch, a second virtual switch, a third virtual switch and a virtual firewall, wherein the first virtual switch is connected to the second virtual switch, the second virtual switch is used to connect to an external network, the first virtual switch is connected to the virtual firewall, the virtual firewall is connected to the third virtual switch, and at least one Vlan is created on the first virtual switch; the method includes:

[0007] Determine a target virtual machine under a target VLAN on the first virtual switch;

[0008] Creating a diversion VLAN on the third virtual switch, disconnecting the target virtual machine from the target VLAN, and connecting the target virtual machine to the diversion VLAN;

[0009] In the virtual firewall, the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the same SuperVlan;

[0010] The target virtual machine communicates with the virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall.

[0011] Optionally, the target virtual machine communicates with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall, including:

[0012] The target virtual machine generates first data and broadcasts the first data in the diversion VLAN;

[0013] The third virtual switch adds the tag of the diversion VLAN to the first data to obtain first tag data, and forwards the first tag data to the virtual firewall;

[0014] The virtual firewall receives the first tag data, converts the tags in the first tag data into tags of other sub-Vlans associated with the SuperVlan, obtains different first conversion data, and broadcasts the corresponding first conversion data in the corresponding sub-Vlan;

[0015] The first virtual switch receives the broadcasted first conversion data, and forwards the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the first virtual switch after removing the tag according to the tag in the first conversion data;

[0016] The third virtual switch receives the broadcasted first converted data, and according to a tag in the first converted data, forwards the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag.

[0017] Optionally, the target virtual machine communicates with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall, including:

[0018] A virtual machine under the target Vlan generates second data and broadcasts the second data in the target Vlan;

[0019] The first virtual switch adds a tag of the target Vlan to the second data to obtain second tagged data, and forwards the second tagged data to the virtual firewall;

[0020] The virtual firewall receives the second tag data, converts the tags in the second tag data into tags of other sub-Vlans associated with the SuperVlan, obtains different second converted data, and broadcasts the corresponding second converted data in the corresponding sub-Vlan;

[0021] The third virtual switch receives the broadcasted second converted data, and according to the tag in the second converted data, forwards the original second data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag, so that the target virtual machine obtains the second data.

[0022] Optionally, in the virtual firewall, the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the same SuperVlan, including:

[0023] Determine whether there is a SuperVlan associated with the target Vlan in the virtual firewall;

[0024] If there is no SuperVlan associated with the target Vlan, a new SuperVlan is created, and the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the new SuperVlan.

[0025] Optionally, the method further comprises:

[0026] If there is a SuperVlan associated with the target Vlan, the diversion Vlan is used as a sub-Vlan and associated with the SuperVlan associated with the target Vlan.

[0027] Optionally, the method further comprises:

[0028] In response to a protection release command for the target virtual machine under the diversion VLAN, disconnect the target virtual machine from the diversion VLAN, and reconnect the target virtual machine to the target VLAN on the first virtual switch;

[0029] The traffic diversion VLAN is cleared, and the traffic diversion VLAN is cleared from the associated SuperVLAN.

[0030] Optionally, only one virtual machine is connected to each traffic diversion VLAN created on the third virtual switch.

[0031] The present disclosure also provides an OpenStack computing node, comprising a first virtual switch, a second virtual switch, a third virtual switch and a virtual firewall, wherein the first virtual switch is connected to the second virtual switch, the second virtual switch is used to connect to an external network, the first virtual switch is connected to the virtual firewall, the virtual firewall is connected to the third virtual switch, and at least one Vlan is created on the first virtual switch; and further comprising:

[0032] A virtual machine determination module, used to determine a target virtual machine under a target VLAN on the first virtual switch;

[0033] A virtual machine traffic diversion module, configured to create a traffic diversion VLAN on the third virtual switch, disconnect the target virtual machine from the target VLAN, and connect the target virtual machine to the traffic diversion VLAN;

[0034] A Vlan aggregation module is used to associate the diversion Vlan and the target Vlan as sub-Vlans in the virtual firewall to the same SuperVlan;

[0035] The target virtual machine is used to communicate with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall.

[0036] Optionally, the target virtual machine is used to generate first data and broadcast the first data in the diversion Vlan;

[0037] The third virtual switch is used to add the tag of the diversion Vlan to the first data to obtain first tagged data, and forward the first tagged data to the virtual firewall;

[0038] The virtual firewall is used to receive the first tag data, convert the tags in the first tag data into tags of other sub-Vlans associated with the SuperVlan, obtain different first converted data, and broadcast the corresponding first converted data in the corresponding sub-Vlan;

[0039] The first virtual switch is used to receive the first converted data broadcasted, and forward the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the first virtual switch after removing the tag according to the tag in the first converted data;

[0040] The third virtual switch is used to receive the broadcasted first converted data, and forward the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag according to the tag in the first converted data.

[0041] Optionally, the virtual machine under the target Vlan is used to generate second data and broadcast the second data in the target Vlan;

[0042] The first virtual switch is used to add a tag of the target Vlan to the second data to obtain second tagged data, and forward the second tagged data to the virtual firewall;

[0043] The virtual firewall is used to receive the second tag data, convert the tags in the second tag data into tags of other sub-Vlans associated with the SuperVlan, obtain different second converted data, and broadcast the corresponding second converted data in the corresponding sub-Vlan;

[0044] The third virtual switch is used to receive the broadcasted second converted data, and according to the tag in the second converted data, after removing the tag, forward the original second data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch, so that the target virtual machine obtains the second data.

[0045] Through the above technical solution, the network connection of the target virtual machine is first migrated from the target Vlan to the drainage Vlan, and the target Vlan and the drainage Vlan are associated with the same SuperVlan. According to the network architecture of the OpenStack computing node, after completing the above operation, when the target virtual machine actively communicates with the virtual machines under other sub-Vlans in the SuperVlan, the traffic is first diverted to the third virtual switch, and then from the third virtual switch to the virtual firewall, thereby realizing the protection of east-west traffic through the built-in security policy of the virtual firewall.

[0046] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0048] Figure 1 It is a schematic diagram of directly deploying a physical firewall in a data center in the related art;

[0049] Figure 2 This is the network architecture diagram of a traditional OpenStack computing node;

[0050] Figure 3 is a network architecture diagram of an OpenStack computing node in an embodiment of the present disclosure;

[0051] Figure 4 is a flow chart of a virtual machine secure communication method according to an embodiment of the present disclosure;

[0052] Figure 5 is a schematic diagram of virtual machine connections of an OpenStack computing node in an embodiment of the present disclosure;

[0053] Figure 6 is another virtual machine connection diagram of the OpenStack computing node in the embodiment of the present disclosure;

[0054] Figure 7 This is another flow chart of the virtual machine secure communication method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0055] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0056] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0057] In order to solve the problem of protecting east-west traffic in cloud computing scenarios, the embodiments of the present disclosure provide an OpenStack computing node and a virtual machine secure communication method based on the OpenStack computing node to achieve security protection for the east-west traffic of virtual machines.

[0058] Figure 2 The network architecture diagram of the traditional OpenStack computing node is shown in Figure 2 It can be seen that the traditional OpenStack computing node includes a first virtual switch and a second virtual switch, and the first virtual switch is connected to the second virtual switch. Among them, the first virtual switch is br-int, which is an integrated bridge device. All virtual machines will be connected to br-int. The second virtual switch is br-ex, which is a bridge device connected to the external network. At least one Vlan (Virtual Local Area Network) is created on the first virtual switch for connecting virtual machines.

[0059] Figure 3The network architecture diagram of the OpenStack computing node in the embodiment of the present disclosure is shown. Figure 3 It can be seen that the OpenStack computing node of the embodiment of the present disclosure includes: a first virtual switch and a second virtual switch, the first virtual switch is connected to the second virtual switch, and in addition, a security protection layer is created on the OpenStack computing node, and security protection for virtual machines is achieved through the security protection layer. The security protection layer includes a third virtual switch and a virtual firewall, the third virtual switch is a virtualized bridge device, and the virtual firewall is a virtualized firewall device. Among them, the first virtual switch is connected to the virtual firewall, and the virtual firewall is connected to the third virtual switch. The third virtual switch can be used to create a drainage Vlan for connecting virtual machines.

[0060] In an optional embodiment, the OpenStack computing node also includes a fourth virtual switch, which is connected to the virtual firewall. The fourth virtual switch is used to provide a management network for the virtual firewall. The management personnel can manage the virtual firewall through the management network provided by the fourth virtual switch, such as configuring security policies in the virtual firewall.

[0061] based on Figure 3 The network architecture of the OpenStack computing node shown in the figure is Figure 4 A flowchart of a virtual machine secure communication method in an exemplary embodiment is shown. Figure 4 , the method comprising:

[0062] S101, determining a target virtual machine under a target VLAN on a first virtual switch.

[0063] The target Vlan may be any Vlan created on the first virtual switch, one or more virtual machines are connected to the target Vlan, and the target virtual machine may be any virtual machine connected to the target Vlan. For example, the user may select a virtual machine under a Vlan connected to the first virtual switch on the display interface, thereby determining the target virtual machine under the target Vlan based on the user's selection operation of the virtual machine.

[0064] S102: Create a diversion VLAN on the third virtual switch, disconnect the target virtual machine from the target VLAN, and connect the target virtual machine to the diversion VLAN.

[0065] After the target virtual machine is determined, a Vlan is created on the third virtual switch, which will be used as the drainage Vlan, and then the connection between the target virtual machine and the target Vlan is disconnected, and the target virtual machine is connected to the drainage Vlan. Specifically, a new veth pair is created, which is used to connect the target virtual machine and the third virtual switch, and is specifically used to divert the traffic of the target virtual machine to the third virtual switch through the port of the drainage Vlan.

[0066] S103: In the virtual firewall, the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the same SuperVlan.

[0067] After the diversion Vlan is created on the third virtual switch, the target Vlan and the diversion Vlan are respectively used as sub-Vlans in the virtual firewall and associated with the same SuperVlan. It should be understood that SuperVlan means that in a physical network, multiple Vlans with mutually isolated broadcast domains are aggregated into a logical Vlan. The multiple Vlans are called sub-Vlans, and the aggregated Vlan is called SuperVlan. After associating the multiple sub-Vlans with the SuperVlan, only one IP subnet needs to be allocated to the SuperVlan, and these sub-Vlans can share the same IP subnet and default gateway.

[0068] In the above steps, the process of associating the target Vlan and the diversion Vlan to the same SuperVlan includes: determining whether there is a SuperVlan associated with the target Vlan in the virtual firewall; if there is no SuperVlan associated with the target Vlan, creating a new SuperVlan, and associating the diversion Vlan and the target Vlan as sub-Vlans to the new SuperVlan. Optionally, if there is a SuperVlan associated with the target Vlan, the diversion Vlan is associated as a sub-Vlan to the SuperVlan associated with the target Vlan.

[0069] Figure 5-6 A schematic diagram of virtual machine connections of an OpenStack computing node in an embodiment of the present disclosure is shown. Figure 5 As shown, Vlan1 (not shown in the figure), Vlan2 and Vlan3 (not shown in the figure) are initially created on the first virtual switch, wherein virtual machines VM1, VM2 and VM3 are connected to Vlan2. Figure 6As shown, assuming that VM1 is determined as the target virtual machine, a diversion VLAN, namely VLAN3001, is created on the third virtual switch, and VM1 is connected to VLAN3001. Then a new SuperVLAN is created in the virtual firewall, which is associated with VLAN2 and VLAN3001, and is recorded as:

[0070] SuperVlan1: {Vlan2, Vlan3001}.

[0071] like Figure 6 As shown, assuming that VM2 is determined as the target virtual machine, a diversion VLAN, namely VLAN3002, is created on the third virtual switch, and VM2 is connected to VLAN3002. Then, VLAN3002 is associated with SuperVLAN1 in the virtual firewall, so that SuperVLAN1 becomes:

[0072] SuperVlan1: {Vlan2, Vlan3001, Vlan3002}.

[0073] S104: The target virtual machine communicates with the virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall.

[0074] Through the above steps S101 to S104, the network connection of the target virtual machine is firstly migrated from the target Vlan to the diversion Vlan, and the target Vlan and the diversion Vlan are associated with the same SuperVlan. Figure 6 It can be seen from the network architecture of the OpenStack computing node shown that after completing the above operations, when the target virtual machine communicates with the virtual machines under other sub-Vlans in the SuperVlan, the traffic is first directed to the third virtual switch, and then from the third virtual switch to the virtual firewall, thereby achieving protection of east-west traffic through the built-in security policy of the virtual firewall.

[0075] Furthermore, only one virtual machine is connected to each diversion VLAN created on the third virtual switch, thereby ensuring that the traffic between any two virtual machines under these sub-VLANs in the same SuperVlan will pass through the virtual firewall, achieving micro-segmentation protection level for the virtual machines.

[0076] Understandably, micro-segment protection abandons the traditional concept of security domains and directly focuses the security boundary on the single-machine level. Security policies can be deployed for a single virtual machine, greatly reducing the scope of the security protection area. In this way, even if a virtual machine is infected with malicious code, since other virtual machines in the same network are in a protected state, the further spread of malicious code can be effectively prevented. In the micro-segmentation architecture, it is equivalent to deploying a firewall for each virtual machine separately.

[0077] For ease of understanding, the following Figure 6 The network architecture shown illustrates the process of communication between the target virtual machine and the virtual machines under each sub-Vlan associated with the SuperVlan.

[0078] When the target virtual machine actively communicates with the virtual machines under each sub-Vlan associated with the SuperVlan, first, the target virtual machine generates first data and broadcasts the first data in the diversion Vlan.

[0079] Then, the third virtual switch adds the tag of the diversion VLAN to the first data to obtain first tagged data, and forwards the first tagged data to the virtual firewall.

[0080] Then, the virtual firewall receives the first marking data, converts the marks in the first marking data into marks of other sub-VLANs associated with the SuperVlan, obtains different first converted data, and broadcasts the corresponding first converted data in the corresponding sub-VLAN.

[0081] Then, the first virtual switch receives the broadcasted first converted data, and forwards the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the first virtual switch after removing the tag according to the tag in the first converted data.

[0082] In addition, the third virtual switch also receives the broadcasted first converted data, and according to the tag in the first converted data, forwards the original first data to the virtual machine under the sub-VLAN corresponding to the tag on the third virtual switch after removing the tag.

[0083] As a specific embodiment, Figure 6 The above communication process is described by taking VM1 as the target virtual machine, VM3 as the virtual machine that the target virtual machine wants to communicate with, and VM1 sending an ARP (Address Resolution Protocol) request to VM3 as an example.

[0084] VM1 generates an ARP request, which includes the IP address, MAC address of VM1 and the IP address of VM3, and VM1 broadcasts the ARP request in Vlan3001. The ARP request enters the third virtual switch from the Vlan3001 port, and the third virtual switch adds a Vlan3001 tag to the ARP request, obtains an ARP request marked as Vlan3001 (i.e., the first tag data), and forwards the ARP request marked as Vlan3001 to the virtual firewall.

[0085] SuperVlan1 is created on the virtual firewall: {Vlan2, Vlan3001, Vlan3002}. The virtual firewall converts the Vlan3001 tag of the ARP request into the Vlan2 tag, obtains the ARP request marked as Vlan2 (i.e., the corresponding first conversion data), and broadcasts the ARP request marked as Vlan2 in Vlan2. At the same time, the Vlan3001 tag of the ARP request is also converted into the Vlan3002 tag, obtains the ARP request marked as Vlan3002 (i.e., the corresponding first conversion data), and broadcasts the ARP request marked as Vlan3002 in Vlan3002.

[0086] The first virtual switch removes the tag in the ARP request marked as Vlan2 to obtain the original ARP request, and then forwards the original ARP request to VM3 under Vlan2 according to the Vlan2 tag. VM3 checks whether the IP address in the received ARP request is consistent with its own IP address, and confirms that the IP addresses are consistent, so it updates the local ARP cache according to the IP address and MAC address of VM1 in the ARP request, and generates an ARP response containing its own MAC address, and returns the ARP response to VM1 according to the IP address and MAC address of VM1.

[0087] The third virtual switch removes the tag in the ARP request marked as Vlan3002 to obtain the original ARP request, and then forwards the original ARP request to VM2 under Vlan3002 according to the Vlan3002 tag. VM2 checks whether the IP address in the received ARP request is consistent with its own IP address, and determines that the IP addresses are inconsistent, so it discards the ARP request.

[0088] The following is based on Figure 6 The network architecture shown illustrates another process of the target virtual machine communicating with the virtual machines under each sub-Vlan associated with the SuperVlan.

[0089] When a virtual machine under the target Vlan associated with the SuperVlan actively communicates with the target virtual machine, first, the virtual machine under the target Vlan generates second data and broadcasts the second data in the target Vlan.

[0090] Then, the first virtual switch adds the tag of the target Vlan to the second data to obtain second tagged data, and forwards the second tagged data to the virtual firewall.

[0091] Then, the virtual firewall receives the second tag data, converts the tags in the second tag data into tags of other sub-Vlans associated with the SuperVlan, obtains different second converted data, and broadcasts the corresponding second converted data in the corresponding sub-Vlan.

[0092] Then, the third virtual switch receives the broadcasted second converted data, and forwards the original second data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag according to the tag in the second converted data, so that the target virtual machine obtains the second data.

[0093] As a specific embodiment, Figure 6 The above communication process is described by taking VM2 as the target virtual machine, VM3 as the virtual machine that wants to communicate with the target virtual machine, and VM3 sending an ARP request to VM2 as an example.

[0094] VM3 generates an ARP request, which includes the IP address, MAC address of VM3 and the IP address of VM2, and VM3 broadcasts the ARP request in Vlan2. The ARP request enters the first virtual switch from the Vlan2 port, and the first virtual switch adds a Vlan2 tag to the ARP request, obtains an ARP request marked as Vlan2 (i.e., the second tag data), and forwards the ARP request marked as Vlan2 to the virtual firewall.

[0095] SuperVlan1: {Vlan2, Vlan3001, Vlan3002} is created on the virtual firewall. The virtual firewall converts the Vlan2 tag of the ARP request into the Vlan3001 tag, obtains the ARP request marked with Vlan3001 (i.e., the corresponding second conversion data), and broadcasts the ARP request marked with Vlan3001 in Vlan3001. At the same time, the Vlan2 tag of the ARP request is also converted into the Vlan3002 tag, obtains the ARP request marked with Vlan3002 (i.e., the corresponding second conversion data), and broadcasts the ARP request marked with Vlan3002 in Vlan3002.

[0096] The third virtual switch removes the tag in the ARP request marked as Vlan3001 to obtain the original ARP request, and then forwards the original ARP request to VM1 under Vlan3001 according to the Vlan3001 tag. At the same time, the third virtual switch also removes the tag in the ARP request marked as Vlan3002 to obtain the original ARP request, and then forwards the original ARP request to VM2 under Vlan3002 according to the Vlan3002 tag.

[0097] VM1 receives the ARP request forwarded by the third virtual switch. Since the IP address in the ARP request is inconsistent with its own IP address, VM1 discards the ARP request.

[0098] VM2 receives the ARP request forwarded by the third virtual switch. Since the IP address in the ARP request is consistent with its own IP address, VM2 updates the local ARP cache according to the IP address and MAC address of VM3 in the ARP request, and generates an ARP response containing its own MAC address, and returns the ARP response to VM3 according to the IP address and MAC address of VM3.

[0099] In the above technical scheme, by creating a diversion VLAN on the third virtual switch and using SuperVlan technology and tag conversion on the virtual firewall, the communication traffic between the protected target virtual machine and other virtual machines in the same network segment can be introduced into the virtual firewall, and the communication traffic is detected through the security policy set in the virtual firewall. The virtual firewall releases the traffic that passes the detection and blocks the traffic that fails the detection, ensuring that the communication traffic is safe, thereby effectively preventing the spread of malicious code and protecting the communication security of the virtual machine.

[0100] Furthermore, when it is considered that a certain virtual machine no longer requires east-west traffic protection, the protection of the virtual machine can be removed. Figure 7 Another flow chart of a virtual machine secure communication method in an exemplary embodiment is shown, Figure 7 As shown in the figure, taking the target virtual machine as an example, the process of removing the protection of the target virtual machine includes:

[0101] S201, in response to a protection release command for a target virtual machine under the diversion VLAN, disconnect the target virtual machine from the diversion VLAN, and reconnect the target virtual machine to the target VLAN on the first virtual switch.

[0102] For example, the user can select the target virtual machine under the diversion VLAN connected to the third virtual switch on the display interface, such as selecting Figure 6 VM1 connected to Vlan3001 is used, and then a protection release command is initiated based on the user's selection of the virtual machine.

[0103] In response to the protection release command, the target virtual machine is disconnected from the diversion VLAN, and the target virtual machine is reconnected to the original VLAN on the first virtual switch, that is, the target VLAN. For example, VM1 is disconnected from VLAN3001, and VM1 is reconnected to VLAN2 on the first virtual switch.

[0104] S202: Clear the traffic diversion VLAN, and clear the traffic diversion VLAN from the associated SuperVLAN.

[0105] Exemplarily, Vlan3001 is cleared on the third virtual switch, and Vlan3001 is cleared from the associated SuperVlan1, so that SuperVlan1 changes from {Vlan2, Vlan3001, Vlan3002} to:

[0106] SuperVlan1: {Vlan2, Vlan3002}.

[0107] In an exemplary embodiment, an OpenStack computing node is also provided, the OpenStack computing node includes a first virtual switch, a second virtual switch, a third virtual switch and a virtual firewall, the first virtual switch is connected to the second virtual switch, the second virtual switch is used to connect to an external network, the first virtual switch is connected to the virtual firewall, the virtual firewall is connected to the third virtual switch, and at least one Vlan is created on the first virtual switch. In addition, the OpenStack computing node also includes:

[0108] A virtual machine determination module, used to determine a target virtual machine under a target VLAN on the first virtual switch;

[0109] A virtual machine traffic diversion module, configured to create a traffic diversion VLAN on the third virtual switch, disconnect the target virtual machine from the target VLAN, and connect the target virtual machine to the traffic diversion VLAN;

[0110] A Vlan aggregation module is used to associate the diversion Vlan and the target Vlan as sub-Vlans in the virtual firewall to the same SuperVlan;

[0111] The target virtual machine is used to communicate with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall.

[0112] Optionally, in the OpenStack computing node, the target virtual machine is used to generate first data and broadcast the first data in the diversion Vlan;

[0113] The third virtual switch is used to add the tag of the diversion Vlan to the first data to obtain first tagged data, and forward the first tagged data to the virtual firewall;

[0114] The virtual firewall is used to receive the first tag data, convert the tags in the first tag data into tags of other sub-Vlans associated with the SuperVlan, obtain different first converted data, and broadcast the corresponding first converted data in the corresponding sub-Vlan;

[0115] The first virtual switch is used to receive the first converted data broadcasted, and forward the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the first virtual switch after removing the tag according to the tag in the first converted data;

[0116] The third virtual switch is used to receive the broadcasted first converted data, and forward the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag according to the tag in the first converted data.

[0117] Optionally, in the OpenStack computing node, the virtual machine under the target Vlan is used to generate second data and broadcast the second data in the target Vlan;

[0118] The first virtual switch is used to add a tag of the target Vlan to the second data to obtain second tagged data, and forward the second tagged data to the virtual firewall;

[0119] The virtual firewall is used to receive the second tag data, convert the tags in the second tag data into tags of other sub-Vlans associated with the SuperVlan, obtain different second converted data, and broadcast the corresponding second converted data in the corresponding sub-Vlan;

[0120] The third virtual switch is used to receive the broadcasted second converted data, and according to the tag in the second converted data, after removing the tag, forward the original second data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch, so that the target virtual machine obtains the second data.

[0121] Optionally, the Vlan aggregation module is used to:

[0122] Determine whether there is a SuperVlan associated with the target Vlan in the virtual firewall;

[0123] If there is no SuperVlan associated with the target Vlan, a new SuperVlan is created, and the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the new SuperVlan.

[0124] Optionally, the Vlan aggregation module is further used for:

[0125] If there is a SuperVlan associated with the target Vlan, the diversion Vlan is used as a sub-Vlan and associated with the SuperVlan associated with the target Vlan.

[0126] Optionally, the OpenStack computing node further includes:

[0127] a virtual machine reconnection module, configured to disconnect the target virtual machine from the diversion VLAN in response to a protection release command for the target virtual machine under the diversion VLAN, and reconnect the target virtual machine to the target VLAN on the first virtual switch;

[0128] The Vlan clearing module is used to clear the diversion Vlan and clear the diversion Vlan from the associated SuperVlan.

[0129] Optionally, only one virtual machine is connected to each traffic diversion VLAN created on the third virtual switch.

[0130] Regarding the OpenStack computing node in the above embodiment, the specific manner in which the operations performed by each module, virtual machine, virtual switch, and virtual firewall have been described in detail in the relevant method embodiments, and will not be elaborated here.

[0131] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0132] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0133] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A virtual machine secure communication method, characterized in that: Applied to an OpenStack computing node, the OpenStack computing node includes a first virtual switch, a second virtual switch, a third virtual switch and a virtual firewall, the first virtual switch is connected to the second virtual switch, the second virtual switch is used to connect to an external network, the first virtual switch is connected to the virtual firewall, the virtual firewall is connected to the third virtual switch, and at least one Vlan is created on the first virtual switch; the method includes: Determine a target virtual machine under a target VLAN on the first virtual switch; Creating a diversion VLAN on the third virtual switch, disconnecting the target virtual machine from the target VLAN, and connecting the target virtual machine to the diversion VLAN; In the virtual firewall, the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the same SuperVlan; The target virtual machine communicates with the virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall.

2. The method according to claim 1, characterized in that: The target virtual machine communicates with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall, including: The target virtual machine generates first data and broadcasts the first data in the diversion VLAN; The third virtual switch adds the tag of the diversion VLAN to the first data to obtain first tag data, and forwards the first tag data to the virtual firewall; The virtual firewall receives the first tag data, converts the tags in the first tag data into tags of other sub-Vlans associated with the SuperVlan, obtains different first conversion data, and broadcasts the corresponding first conversion data in the corresponding sub-Vlan; The first virtual switch receives the broadcasted first conversion data, and forwards the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the first virtual switch after removing the tag according to the tag in the first conversion data; The third virtual switch receives the broadcasted first converted data, and according to a tag in the first converted data, forwards the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag.

3. The method according to claim 1, characterized in that: The target virtual machine communicates with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall, including: A virtual machine under the target Vlan generates second data and broadcasts the second data in the target Vlan; The first virtual switch adds a tag of the target Vlan to the second data to obtain second tagged data, and forwards the second tagged data to the virtual firewall; The virtual firewall receives the second tag data, converts the tags in the second tag data into tags of other sub-Vlans associated with the SuperVlan, obtains different second converted data, and broadcasts the corresponding second converted data in the corresponding sub-Vlan; The third virtual switch receives the broadcasted second converted data, and according to the tag in the second converted data, forwards the original second data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag, so that the target virtual machine obtains the second data.

4. The method according to claim 1, characterized in that In the virtual firewall, the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the same SuperVlan, including: Determine whether there is a SuperVlan associated with the target Vlan in the virtual firewall; If there is no SuperVlan associated with the target Vlan, a new SuperVlan is created, and the diversion Vlan and the target Vlan are respectively used as sub-Vlans and associated with the new SuperVlan.

5. The method according to claim 4, characterized in that The method further comprises: If there is a SuperVlan associated with the target Vlan, the diversion Vlan is used as a sub-Vlan and associated with the SuperVlan associated with the target Vlan.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to a protection release command for the target virtual machine under the diversion VLAN, disconnect the target virtual machine from the diversion VLAN, and reconnect the target virtual machine to the target VLAN on the first virtual switch; The traffic diversion VLAN is cleared, and the traffic diversion VLAN is cleared from the associated SuperVLAN.

7. The method according to any one of claims 1 to 5, characterized in that: Only one virtual machine is connected to each traffic diversion VLAN created on the third virtual switch.

8. An OpenStack computing node, characterized in that: The system comprises a first virtual switch, a second virtual switch, a third virtual switch and a virtual firewall, wherein the first virtual switch is connected to the second virtual switch, the second virtual switch is used to connect to an external network, the first virtual switch is connected to the virtual firewall, the virtual firewall is connected to the third virtual switch, and at least one Vlan is created on the first virtual switch; and further comprises: A virtual machine determination module, used to determine a target virtual machine under a target VLAN on the first virtual switch; A virtual machine traffic diversion module, configured to create a traffic diversion VLAN on the third virtual switch, disconnect the target virtual machine from the target VLAN, and connect the target virtual machine to the traffic diversion VLAN; A Vlan aggregation module is used to associate the diversion Vlan and the target Vlan as sub-Vlans in the virtual firewall to the same SuperVlan; The target virtual machine is used to communicate with virtual machines under each sub-Vlan associated with the SuperVlan through the third virtual switch and the virtual firewall.

9. The OpenStack computing node according to claim 8, characterized in that: The target virtual machine is used to generate first data and broadcast the first data in the diversion Vlan; The third virtual switch is used to add the tag of the diversion Vlan to the first data to obtain first tagged data, and forward the first tagged data to the virtual firewall; The virtual firewall is used to receive the first tag data, convert the tags in the first tag data into tags of other sub-Vlans associated with the SuperVlan, obtain different first converted data, and broadcast the corresponding first converted data in the corresponding sub-Vlan; The first virtual switch is used to receive the first converted data broadcasted, and forward the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the first virtual switch after removing the tag according to the tag in the first converted data; The third virtual switch is used to receive the broadcasted first converted data, and forward the original first data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch after removing the tag according to the tag in the first converted data.

10. The OpenStack computing node according to claim 8, characterized in that: The virtual machine under the target Vlan is used to generate second data and broadcast the second data in the target Vlan; The first virtual switch is used to add a tag of the target Vlan to the second data to obtain second tagged data, and forward the second tagged data to the virtual firewall; The virtual firewall is used to receive the second tag data, convert the tags in the second tag data into tags of other sub-Vlans associated with the SuperVlan, obtain different second converted data, and broadcast the corresponding second converted data in the corresponding sub-Vlan; The third virtual switch is used to receive the broadcasted second converted data, and according to the tag in the second converted data, after removing the tag, forward the original second data to the virtual machine under the sub-Vlan corresponding to the tag on the third virtual switch, so that the target virtual machine obtains the second data.

Citation Information

Patent Citations

  • Method and device for creating firewall rule of virtualization platform

    CN106453333A

  • Virtual network security protection system, and traffic attracting method and device

    CN107872443A