Hi ,
Thanks for reaching out to Microsoft Q&A.
The error message "Server did not respond properly to VPN control packets. Session State: Key Material Sent" indicates an issue with the VPN authentication or communication between your client and the Azure VPN Gateway. Here are the possible things you should check and troubleshoot:
- Certificate Issues
Since you're using a certificate for authentication, verify the following:
- Ensure that the Root and Client Certificates are correctly uploaded in the Azure VPN Gateway.
- The client certificate must be generated from the same root certificate that was uploaded to Azure.
- If you’re using Azure Point-to-Site (P2S) VPN, ensure the client certificate is installed on your machine under Current User > Personal > Certificates.
- Check that the certificate is not expired.
- VPN Gateway Configuration
- Ensure that the VPN Gateway SKU supports the type of authentication you’re using.
- If using IKEv2, ensure it is enabled on the VPN Gateway.
- If using OpenVPN, ensure the correct profile is being used.
- Client-Side VPN Configuration
- Make sure you are using the correct VPN client package downloaded from the Azure portal.
- If using Windows, check the VPN configuration under Windows Settings and verify that it is set to use the correct VPN protocol (IKEv2, SSTP, or OpenVPN).
- Ensure the correct certificate is being selected during authentication.
- Network and Firewall Rules
- Check if any firewall or antivirus software is blocking the VPN connection. Ensure that UDP ports 500, 4500, and TCP 443 are open.
- If behind a corporate network, check if there is a proxy or network policy blocking VPN traffic.
- VPN Logs and Debugging
- If using Windows, check the logs in Event Viewer > Applications and Services Logs > Microsoft > Windows > RasClient for more details.
- Also check from powershell command, Get-WinEvent -LogName Application -MaxEvents 50 | Where-Object { $_.Message -match "RAS" }
- Restart the IKE and IPsec services
- Disconnect and try reconnecting after a minute.
If the issue persists, try re-importing the certificate and re-downloading the VPN configuration package from Azure. Let me know if you need further troubleshooting!
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.