I had the same issue on 3 Windows 10 PCs. The above registry fix did not work initially.
The only thing the 3 PCs had in common is that they were all upgraded from Windows 7 at some stage.
Microsoft support suggested doing an in-place reinstall of Windows 10 from DVD or USB stick using their media creation tool. That kept all my apps and data, in the same way the upgrade from W7 does.
After the in-place upgrade, I had the same error, then applied the registry fix, and the connection was successful.
I also tried installing Windows 10 on a reformatted hard drive. That also worked after the registry fix.
The registry fix appears to be necessary if the VPN client and/or server are behind a NAT device such as a broadband router.
Once the connection was established, additional steps were needed to enable internet access for the VPN client via the VPN connection. In my case, I had to add the range of client source IP addresses 10.2.0.0/8 to my NAS firewall, as the VPN server is my NAS.
You have verified you can ping the VPN server? You have trusted any self-signed certificates that you might be using. The error you receive is a generic communication error. – Ramhound – 2018-02-26T14:40:23.867
Yes I can ping the server fine. Secondly, there were no certificates to trust. I connect directly from my iOS and it works there so it’s just a client issue. – Asad Moeen – 2018-02-26T14:41:45.883