When two hosts on different networks are to communicate over an insecure network such as the Internet, those hosts may require their communications to be secured as they transit the insecure network. It may be inconvenient for the hosts themselves to secure their communications. In such cases, the network facilities of the respective hosts may be used to secure the communications that they carry for the hosts. A common approach is to employ a security gateway such as the secure tunnel mode of the Internet Protocol (IP) Security protocol (IPSec), describe in RFC 7296 Section 1.1.1, which is commonly used to provide a site-to-site virtual private network (VPN). The IPSec gateway devices servicing the respective hosts' networks that provide this IPSec tunnel mode will be referred to herein as gateways.
Providing IPSec tunnels is straightforward for a pair of subnets (virtual or logical) and respective directly communicating gateways. However, in modern network deployments, administrators may deploy many subnets on different clouds, each potentially providing communication with the others across the Internet. Each cloud may host multiple tenant subnets and assign its own pool of gateways to secure traffic to/from these subnets. However, due to the limited pool of available Internet addresses and other reasons, these gateways may have to share a limited number of Internet-routable IP addresses. Typically, these gateways are deployed behind some kind of network multiplexor, which multiplexes the traffic between the different gateways. That is, a multiplexor may help multiple gateways with private addresses share a small pool of Internet addresses.
As observed only by the Inventors, this address-multiplexing approach gives rise to two fundamental problems. During IPsec tunnel establishment, the possibly-multiplexed IP addresses of the Internet Key Exchange (IKE) messages are used to choose the IKE policies that are used to negotiate the IKE Security Associations (SAs). However, as appreciated only by the inventors, since the IP addresses for IKE messages for different tunnel negotiations may be identical, there is ambiguity in choosing the correct policy and gateway to negotiate an SA. Put another way, IKE messages for two different tunnels may be indistinguishable based on their Internet addresses and therefore the tunnels have been unable to share the same Internet addresses.
The second problem discovered by the inventors stems from the fact that the different IPsec tunnels connecting the various tenant subnets among the Internet-separated clouds are tightly coupled with a specific pair of gateways. All IPsec traffic—both control (IKE) and data (Encapsulating Security Payload (ESP)/Authentication Header AH)) exchanges must always be routed between the gateway devices associated with the tunnels; at each end, the same gateway must handle all of a given tunnel's traffic, even if they might otherwise be interchangeable with respect to routing. But when the gateways share multiplexed Internet addresses, the IPsec traffic for different tunnels would be indistinguishable from each other at the network layer, as the datagram IP addresses would be same for all such packets. As the Inventors have observed, this creates ambiguity in how the packets are routed to the appropriate Gateway devices and until now prevents address sharing.
Techniques related to enabling IPSec tunnels over multiplexed Internet addresses are described below.
The following summary is included only to introduce some concepts discussed in the Detailed Description below. This summary is not comprehensive and is not intended to delineate the scope of the claimed subject matter, which is set forth by the claims presented at the end.
Embodiments relate to enabling clouds to multiplex their public network addresses among private addresses of IPSec gateways while making sure that IPSec tunnel packets are delivered to the private addresses of the IPSec tunnels that they are associated with. When IPSec packets egress from a cloud, the cloud may determine which IPSec tunnel or gateway the IPSec packets are associated with and modify the IPSec packets to identify the associated tunnel or gateway. When IPSec packets ingress to the cloud, the cloud may find identity information in the IPSec packets that identifies the associated tunnel or gateway (or security policy). The identity information is used to direct the IPSec packets to the associated tunnel or gateway.
Many of the attendant features will be explained below with reference to the following detailed description considered in connection with the accompanying drawings.
The present description will be better understood from the following detailed description read in light of the accompanying drawings, wherein like reference numerals are used to designate like parts in the accompanying description.
If the gateways implement the IPSec protocol to provide site-to-site tunnels, absent embodiments described herein, the following problems arise. Consider the first multiplexor 110 implementing process 114 for the IPSec protocol suite. The first multiplexor 110 may receive from the second multiplexor 112 an IPSec datagram1 intended for a first tunnel 116 associated with the first gateway 100. The first multiplexor also receives a second datagram2 from the second multiplexor 112 that is intended for a second tunnel 118 associated with the other first gateway 102. For datagram1, the first multiplexor must decide whether to pass it to first gateway 100 or first gateway 102. The same is true for datagram2: which gateway to address it to. However, as per the standard IPSec protocol and ordinary network translation, with respect to the first tunnel 116 and second tunnel 118, datagram1 and datagram2 are indistinguishable, from a network layer perspective. The multiplexor has no way to know which gateway should receive which datagram.
To clarify, the IPSec protocol specifies that the endpoints of a tunnel form an SA and the tunnel must flow through only those securely associated endpoints. The security association is, in effect, between the network addresses of the endpoints. A gateway will decide which datagrams belong to which tunnels based on “to” and “from” IP addresses of the datagrams. In the situation shown in
Returning to
At step 134, after the marked tunnel packet addressed to the second multiplexor 112 is routed through the common network 104 (where VIPA and VIPB are routable), the second multiplexor 112 receives the tunnel packet. The second multiplexor reads the tunnel identifier and selects the corresponding gateway (how this can be done is described below). For example, if the packet is marked as being for a particular tunnel, tenant, or gateway, the multiplexor, in addition to performing functions necessary for address-multiplexing, may modify the tunnel packet to assure that it is delivered to the appropriate gateway and, in some embodiments, to allow the receiving gateway to determine which tunnel the packet is associated with. At step 136, the multiplexor 112.
The multiplexors may maintain or access mapping information 138 which can be used to map the tunnel identifiers to the tunnel identifiers in the tunnel packets exchanged over the common network 104. The mapping information 138 may depend on how the tunnel identifiers are derived and/or are embedded in the tunnel packets. In some embodiments, mapping information is not needed and the opposing ends rely on conventions, static identifiers, combinations of header/packet information, etc.
The second multiplexor 112 (or another asset, as discussed above) receives the modified second packet 172. The modified second packet 172 is analyzed and recognized as a tunnel packet (an IKE packet, in this example). Consequently, the tunnel identifier is extracted from the modified first packet 172. Although the port number is helpful for identifying a tunnel, the addresses of the modified first packet 172 may also help to identify the tunnel. The second multiplexor 112 recognizes the identifier and, according thereto, determines which gateway in cloud B the modified first packet should be addressed to, namely, DIPB2 for second gateway 106. The second multiplexor 112 maps the identifier (port X in this case) to the correct gateway instance. The packet is updated with the address of the correct gateway (second gateway 106). The second multiplexor 112 then transmits the again-modified first packet from an internal interface to the second gateway 106. The second gateway is 106 is assured that it has received a packet for an SA attached/attaching to the second gateway 106. The use of “from” data to identify the tunnel enables the first packet to be properly routed through the common network but also carry additional information about the tunnel or gateway that can be used by cloud B.
The port number “X” in
To elaborate on the dynamic port approach, the port reservation is dynamic in nature and is associated by the NAT (or equivalent component) to a particular gateway. Since multiple tunnels may terminate on the same gateway, such ports are not unique to a tunnel. But, it is unique to a gateway, across all gateways in a cloud deployment. The dynamic port approach implicitly assumes that every gateway device is configured with policies for all tunnels in that cloud deployment.
Data packets (ESP packets) will also be encapsulated with UDP:4500. See RFC 7295, section 2.23 explaining why ESP packets would be UDP encapsulated. Data packets (UDP encapsulated ESP) will be transformed as follows, where “⇒” denotes a translation at a cloud, and where “{a:b, c:d}” denotes “from address a:port b, and to address c:port d”, and where the packets are marked as UDP encapsulated ESP packets.
If another IPSec tunnel is needed, say a second tunnel T2118, the second tunnel T2 may be handled as follows. Suppose that second gateway 106 (GW-B1) in cloud B initiates negotiation for the second tunnel T2118. Suppose also that in this case it is port Y that is reserved for NAT-ing. Then all IKE and UDP encapsulated ESP packets for tunnel T2118 will have source port Y. Further suppose that the other first gateway 102 (GW-A2) in Cloud A is selected for this port. Then all packets for tunnel T2 will flow between the other first gate 102 (GW-A2) and the second gateway 108 (GW-B1) without interfering with any traffic of tunnel T1.
As can be seen from
Other embodiments, described next, may be used to negotiate multiple tunnels between a same pair of IP addresses.
A tunnel identifier (ID) is to be used to identify each tunnel. The Tunnel ID uniquely identifies an IPsec tunnel across all tunnels configured in all gateways in the relevant clouds. The tunnel ID may be a globally unique identifier, a friendly string, or computed as a hash of various unique elements of the IKE policy. The tunnel ID should be known (or derivable independently) on the two gateways between which a given tunnel is to be established.
Regarding the IKE_SA_INIT exchange, the two involved IKE peers negotiate the IKE SA. The initiator selects an IKE policy to use for the tunnel that is being established. With the static port approach, the NAT port is configured within the IKE policy. The IKE responder looks at the 3-tuple (Source IP, Source Port and Destination IP) of the incoming IKE message to find the matching IKE policy. With the dynamic port approach, the 3-tuple is not guaranteed to be unique to a tunnel in a Gateway. In this case, to pass the tunnel ID of the tunnel being established, the initiator sends a vendor ID payload (section 3.12 of RFC 7296) in the IKE_SA_INIT message.
Regarding the IKE_SA_AUTH exchange, for the static port approach, as with the IKE_SA_INIT exchange, the 3-tuple (source IP, source port, destination IP) can be used to uniquely identify the IPsec policy. For the dynamic port approach, the tunnel ID can be passed to in the IDi (initiator ID) and optional IDr (responder ID) payload to identify the tunnel being established and to choose the appropriate IPsec policy to negotiate the child SA. The ID payloads are used in IKE_SA_AUTH exchange as follows (fields are described in the RFC):
HDR, SK {IDi, [IDr, ]AUTH, SAi2, TSi, TSr} is sent, and
HDR, SK {IDr, AUTH, SAr2, TSi, TSr} is sent in reply.
Per section 3.5 of RFC 7296, the following identity-type is allowed to pass vendor-specific information: ID_KEY_ID. An opaque octet stream that may be used to pass vendor-specific information necessary to do certain proprietary types of identification. The initiator will use this for the IDi payloads. The responder will use this ID payload to find the right matching policy, which is used for child SA negotiation and to validate the AUTH payload (for shared secret-based authentication). CREATE_CHILD_SA exchanges are used to create new child SAs (of the SA established above) and to rekey both IKE SAs and child SAs. This will use the same pattern as IKE_SA_AUTH exchange.
The computing device 300 may have one or more displays 322, a camera (not shown), a network interface 324 (or several), as well as storage hardware 326 and processing hardware 328, which may be a combination of any one or more: central processing units, graphics processing units, analog-to-digital converters, bus chips, FPGAs, ASICs, Application-specific Standard Products (ASSPs), or Complex Programmable Logic Devices (CPLDs), etc. The storage hardware 326 may be any combination of magnetic storage, static memory, volatile memory, non-volatile memory, optically or magnetically readable matter, etc. The meaning of the term “storage”, as used herein does not refer to signals or energy per se, but rather refers to physical apparatuses and states of matter. The hardware elements of the computing device 300 may cooperate in ways well understood in the art of machine computing. In addition, input devices may be integrated with or in communication with the computing device 300. The computing device 300 may have any form-factor or may be used in any type of encompassing device. The computing device 300 may be in the form of a handheld device such as a smartphone, a tablet computer, a gaming device, a server, a rack-mounted or backplaned computer-on-a-board, a system-on-a-chip, or others.
Embodiments and features discussed above can be realized in the form of information stored in volatile or non-volatile computer or device readable media. This is deemed to include at least media such as optical storage (e.g., compact-disk read-only memory (CD-ROM)), magnetic media, flash read-only memory (ROM), or any current or future means of storing digital information. The stored information can be in the form of machine executable instructions (e.g., compiled executable binary code), source code, bytecode, or any other information that can be used to enable or configure computing devices to perform the various embodiments discussed above. This is also deemed to include at least volatile memory such as random-access memory (RAM) and/or virtual memory storing information such as central processing unit (CPU) instructions during execution of a program carrying out an embodiment, as well as non-volatile media storing information that allows a program or executable to be loaded and executed. The embodiments and features can be performed on any type of computing device, including portable devices, workstations, servers, mobile wireless devices, and so on.