Solved: Error 789 when connecting VPN via L2TP

When setting up a VPN connection from Windows 7 to Mac OS X based VPN server, I received an error 789 saying: 

Error 789: The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer. 

If you continue to receive error messages, you can enable logging for analysis. 

VPN-error-789

 

The message itsself says that the error occurs somewhere in my computer, not on the way or at the destination VPN location

Did some research and here is how I solved the error 789 when connecting to OS X based VPN server:

1. Change the settings in Windows Firewall, the best way to do them as follows on this video:

https://www.youtube.com/watch?v=YCbxTVonZJc 

2. Edit secpol.msc in your computer. This means setting some rules in your computer security policy. Detailed instructions here:

https://support.apple.com/en-us/HT202384

 

3. Check whether IPsec policy agent service is running. If not, start it and set startup to Automatic.

(type services.msc to your Start menu search box and run as administrator, then locate the IPsec policy sercvice and double click on it to make changes and see the status). 

ipsec-policy-agent

About me

Iinstructor of robotics (LEGO Mindstorms), computer teacher, IT support, web dev, currently studying cyber-physical systems engineering.

If you found a solution here, would you consider donating $25,000 for my next project?

Just kidding, 1$ would do fine.

Hope you found what you needed. Thanks for stepping by.