O recurso ALIYUN::VPC::IpsecServer cria um servidor IPsec-VPN.
Sintaxe
{
"Type": "ALIYUN::VPC::IpsecServer",
"Properties": {
"LocalSubnet": String,
"EffectImmediately": Boolean,
"ClientIpPool": String,
"VpnGatewayId": String,
"IpsecConfig": Map,
"Psk": String,
"IkeConfig": Map,
"IpsecServerName": String,
"PskEnabled": Boolean
}
}
Propriedades
| Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
| LocalSubnet | String | Sim | Sim | Bloco CIDR local. Corresponde ao bloco CIDR da Virtual Private Cloud (VPC) usada para conexão com o cliente. | Separe vários blocos CIDR com vírgulas (,). Exemplo: 192.168.1.0/24,192.168.2.0/24. |
| EffectImmediately | Boolean | Não | Sim | Defina se o túnel IPsec atual será excluído e as negociações reiniciadas. | Valor padrão: false. Valores válidos:
|
| VpnGatewayId | String | Sim | Não | ID do gateway VPN. | Nenhuma |
| IpsecConfig | Map | Não | Sim | Configurações das negociações da Fase 2. | Para mais informações, consulte Propriedades de IpsecConfig. |
| IkeConfig | Map | Não | Sim | Configurações das negociações da Fase 1. | Para mais informações, consulte Propriedades de IkeConfig. |
| ClientIpPool | String | Sim | Sim | Bloco CIDR alocado à interface de rede virtual do cliente. Diferente do bloco CIDR onde o cliente reside. | Quando o cliente acessa o servidor por meio de uma conexão SSL-VPN, o gateway VPN seleciona um endereço IP do bloco CIDR especificado e o atribui ao cliente. Este bloco CIDR não pode entrar em conflito com o bloco CIDR especificado em LocalSubnet. |
| IpsecServerName | String | Não | Sim | Nome da conexão IPsec-VPN. | O nome deve ter entre 2 e 128 caracteres e pode conter letras, dígitos, pontos (.), sublinhados (_) e hifens (-). Deve começar com uma letra e não pode iniciar com http:// ou https://. |
| Psk | String | Não | Sim | Chave pré-compartilhada. | Usada para autenticação entre o gateway VPN e o gateway do cliente. Especifique uma chave ou use a chave padrão gerada aleatoriamente pelo sistema. A chave pode ter até 100 caracteres. |
| PskEnabled | Boolean | Não | Sim | Indica se a autenticação por chave pré-compartilhada está ativada. | Valores válidos:
|
Sintaxe de IpsecConfig
"IpsecConfig": {
"IpsecPfs": String,
"IpsecEncAlg": String,
"IpsecAuthAlg": String,
"IpsecLifetime": Integer
}
Propriedades de IpsecConfig
| Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
| IpsecPfs | String | Não | Sim | Algoritmo de troca de chaves Diffie-Hellman usado nas negociações da Fase 2. Se definido, o sistema encaminha pacotes de todos os protocolos. | Valor padrão: group2. Valores válidos:
|
| IpsecEncAlg | String | Não | Sim | Algoritmo de criptografia usado nas negociações da Fase 2. | Valor padrão: aes. Valores válidos:
|
| IpsecAuthAlg | String | Não | Sim | Algoritmo de autenticação usado nas negociações da Fase 2. | Valor padrão: sha1. Valores válidos:
|
| IpsecLifetime | Integer | Não | Sim | Tempo de vida da Associação de Segurança (SA) resultante das negociações da Fase 2. | Valores válidos: 0 a 86400. Unidade: segundos. Valor padrão: 86400. |
Sintaxe de IkeConfig
"IkeConfig": {
"IkeAuthAlg": String,
"LocalId": String,
"IkeEncAlg": String,
"IkeVersion": String,
"IkeMode": String,
"IkeLifetime": Integer,
"RemoteId": String,
"IkePfs": String
}
Propriedades de IkeConfig
| Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
| IkeAuthAlg | String | Não | Sim | Algoritmo de autenticação usado nas negociações da Fase 1. | Valor padrão: sha1. Valores válidos:
|
| LocalId | String | Não | Sim | ID do gateway VPN. | O ID pode ter até 100 caracteres. O valor padrão é o endereço IP público do gateway VPN. |
| IkeEncAlg | String | Não | Sim | Algoritmo de criptografia usado nas negociações da Fase 1. | Valor padrão: aes. Valores válidos:
|
| IkeVersion | String | Não | Sim | Versão do protocolo Internet Key Exchange (IKE). | Valor padrão: ikev2. Valores válidos:
|
| IkeMode | String | Não | Sim | Modo de negociação IKE. | Valor padrão: main. Valores válidos:
|
| IkeLifetime | Integer | Não | Sim | Tempo de vida da SA resultante das negociações da Fase 1. | Valores válidos: 0 a 86400. Unidade: segundos. Valor padrão: 86400. |
| RemoteId | String | Não | Sim | ID do gateway do cliente. | O ID pode ter até 100 caracteres. O valor padrão é o endereço IP público do gateway do cliente. |
| IkePfs | String | Não | Sim | Algoritmo de troca de chaves Diffie-Hellman usado nas negociações da Fase 1. | Valor padrão: group2. Valores válidos:
|
Parâmetros de resposta
Fn::GetAtt
IpsecServerId: ID do servidor IPsec-VPN.
IpsecServerName: nome do servidor IPsec-VPN.
Exemplos
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"LocalSubnet": {
"Type": "String",
"Description": "The local network segment refers to the network segment on the VPC side that needs to be interconnected with the client network segment. Use half-width commas (,) to separate multiple network segments, for example: 192.168.1.0/24,192.168.2.0/24."
},
"EffectImmediately": {
"Type": "Boolean",
"Description": "true: Apply the new configuration and trigger a reconnection immediately. \nfalse: Trigger a reconnection only when network traffic occurs. (The reconnection may cause the network to be unavailable for a brief moment)",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
},
"ClientIpPool": {
"Type": "String",
"Description": "Client network segment refers to the address segment that assigns access addresses to the virtual network card of the client. Note: The client network segment cannot conflict with the VPC side network segment."
},
"VpnGatewayId": {
"Type": "String",
"Description": "VPN gateway instance ID."
},
"IpsecConfig": {
"Type": "Json",
"Description": "Negotiation parameter configuration in the second phase."
},
"Psk": {
"Type": "String",
"Description": "Pre-Shared key. Used for identity authentication between the VPN gateway and the client. A 16-bit random string is randomly generated by default, or you can manually specify the key. The length is limited to 100 characters."
},
"IkeConfig": {
"Type": "Json",
"Description": "Negotiation parameter configuration in the first phase."
},
"IpsecServerName": {
"Type": "String",
"Description": "The value must be 2 to 128 characters in length and start with a letter or Chinese character. It can contain digits, underscores (_), and hyphens (-)."
},
"PskEnabled": {
"Type": "Boolean",
"Description": "Whether to enable the pre-shared key authentication method. Only the value is true, which means that the pre-shared key authentication mode is enabled.",
"AllowedValues": [
"True",
"true",
"False",
"false"
]
}
},
"Resources": {
"IpsecServer": {
"Type": "ALIYUN::VPC::IpsecServer",
"Properties": {
"LocalSubnet": {
"Ref": "LocalSubnet"
},
"EffectImmediately": {
"Ref": "EffectImmediately"
},
"ClientIpPool": {
"Ref": "ClientIpPool"
},
"VpnGatewayId": {
"Ref": "VpnGatewayId"
},
"IpsecConfig": {
"Ref": "IpsecConfig"
},
"Psk": {
"Ref": "Psk"
},
"IkeConfig": {
"Ref": "IkeConfig"
},
"IpsecServerName": {
"Ref": "IpsecServerName"
},
"PskEnabled": {
"Ref": "PskEnabled"
}
}
}
},
"Outputs": {
"IpsecServerId": {
"Description": "IPsec server ID.",
"Value": {
"Fn::GetAtt": [
"IpsecServer",
"IpsecServerId"
]
}
},
"IpsecServerName": {
"Description": "IPsec server name.",
"Value": {
"Fn::GetAtt": [
"IpsecServer",
"IpsecServerName"
]
}
}
}
}
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ClientIpPool:
Description: 'Client network segment refers to the address segment that assigns
access addresses to the virtual network card of the client. Note: The client
network segment cannot conflict with the VPC side network segment.'
Type: String
EffectImmediately:
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Description: "true: Apply the new configuration and trigger a reconnection immediately.\
\ \nfalse: Trigger a reconnection only when network traffic occurs. (The reconnection\
\ may cause the network to be unavailable for a brief moment)"
Type: Boolean
IkeConfig:
Description: Negotiation parameter configuration in the first phase.
Type: Json
IpsecConfig:
Description: Negotiation parameter configuration in the second phase.
Type: Json
IpsecServerName:
Description: The value must be 2 to 128 characters in length and start with a
letter or Chinese character. It can contain digits, underscores (_), and hyphens
(-).
Type: String
LocalSubnet:
Description: 'The local network segment refers to the network segment on the VPC
side that needs to be interconnected with the client network segment. Use half-width
commas (,) to separate multiple network segments, for example: 192.168.1.0/24,192.168.2.0/24.'
Type: String
Psk:
Description: Pre-Shared key. Used for identity authentication between the VPN
gateway and the client. A 16-bit random string is randomly generated by default,
or you can manually specify the key. The length is limited to 100 characters.
Type: String
PskEnabled:
AllowedValues:
- 'True'
- 'true'
- 'False'
- 'false'
Description: Whether to enable the pre-shared key authentication method. Only
the value is true, which means that the pre-shared key authentication mode is
enabled.
Type: Boolean
VpnGatewayId:
Description: VPN gateway instance ID.
Type: String
Resources:
IpsecServer:
Properties:
ClientIpPool:
Ref: ClientIpPool
EffectImmediately:
Ref: EffectImmediately
IkeConfig:
Ref: IkeConfig
IpsecConfig:
Ref: IpsecConfig
IpsecServerName:
Ref: IpsecServerName
LocalSubnet:
Ref: LocalSubnet
Psk:
Ref: Psk
PskEnabled:
Ref: PskEnabled
VpnGatewayId:
Ref: VpnGatewayId
Type: ALIYUN::VPC::IpsecServer
Outputs:
IpsecServerId:
Description: IPsec server ID.
Value:
Fn::GetAtt:
- IpsecServer
- IpsecServerId
IpsecServerName:
Description: IPsec server name.
Value:
Fn::GetAtt:
- IpsecServer
- IpsecServerName