S2S VPN Connection Custom IPsec policy with client disconnects and never re-establishes
We have a customer that is still using IKEv1 protocol and we are doing our best to accommodate. It is an old connection from years back and we've always had intermittent disconnects. The connection went down recently and we tried to get them to move to IKEv2 and the challenge is that they are still supporting legacy connections with other partners. We decided to at least upgrade our Azure resources from Basic Gateway SKU and more modern technology still following Microsoft documentation regarding Phase 1 and Phase 2 options for IKEv1. Worked with the client and we were able to establish a connection and data was flowing again (one-way data flow. the client sends us public health, clinical data. we process and report required data to state and federal registries on their behalf). The connection up time lasted about 24 hours and down again. See below a small section of the IKEDiagnosticLog - IPs, etc. redacted.
{
"resourceid": "/SUBSCRIPTIONS/0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-TEMP-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2158680Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Remote 209.0.0.0:500: Local 52.0.0.0:500: [SEND] Sending QM Packet for tunnel Id 0x5 and tsId 0xEBF: Policy1:Integrity=SHA1 Cipher=AES-CBC-256 LifeTimeSeconds=27000 LifeTimeKB=102400000 ",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0BE0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2159708Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Remote 209.0.0.0:500: Local 52.0.0.0:500: [LCOAL_MSG] DPD is turned off for tunnelId 0x5, iCookie 0xD3BC0EC90F7486AC and rCookie 0x73316A583408D9DB",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0B4E0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2218257Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Peer sent INVALID_ID_INFORMATION notify",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0BE0/RESOURCEGROUPS/SOLANOPHL-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/SOLANOPHL-TEMP-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2218298Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} IkeCleanupQMNegotiation called with error 13825 and flags 1",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0B4E0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2218370Z",
"level": "Error",
"properties": {
"message": "(Error)[Remote] 209.0.0.0:500 [Local] 52.0.0.0:500 [SESSION_ID] {fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} [ConnType] IKEv1-S2S [ICookie] 0xD3BC0EC90F7486AC [RCookie] 0x73316A583408D9DB [TunnelId] 5 [TSId] 3775 [InboundSPI] 0x0 [OutboundSPI] 0x0 [IkeEvent] SA_NEGOTIATION_FAILED For [SA_type] QM_SA [FailureDirection] Inbound [SAEstablished] false [ErrorCode]13825 [ErrorMessage] No policy configured\r\n",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0BE0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2218571Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Remote 209.0.0.0:500: Local 52.0.0.0:500: tunnelId 0x5, iCookie 0xD3BC0EC90F7486AC and rCookie 0x73316A583408D9DB No Phase2 qms left on active connection",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0BE0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2240097Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Remote 209.0.0.0:500: Local 52.0.0.0:500: [RECEIVED][SA_DELETE] Received IKE SA delete message for tunnelid 0x5 ",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0B0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2240141Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} IkeCleanupMMNegotiation called with error 13885 and flags 0",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/00/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2240338Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Remote 209.0.0.0:500: Local 52.0.0.0:500: [LOCAL_MSG] IKE Tunnel closed for tunnelId 0x5 with status Main mode SA lifetime expired or peer sent a main mode delete.",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
} {
"resourceid": "/SUBSCRIPTIONS/0BE0/RESOURCEGROUPS/My-RG/PROVIDERS/MICROSOFT.NETWORK/VIRTUALNETWORKGATEWAYS/My-GW",
"category": "IKEDiagnosticLog",
"operationName": "IKELogEvent",
"time": "2025-03-10T12:02:58.2240514Z",
"level": "Informational",
"properties": {
"message": "SESSION_ID :{fdbcd6ae-6f2a-4b6e-82a4-0c2d2c07ec7a} Not closing tunnel for mm, MM Owns Tunnel = 262144",
"instance": "GatewayTenantWorker_IN_1"
},
"ClientOperationId": "00000000-0000-0000-0000-000000000000",
"CorrelationRequestId": "00000000-0000-0000-0000-000000000000",
"GatewayManagerVersion": "24.10.0.115"
}
Any help would be greatly appreciated.
Thank you,
DAB