Cant connect to VPN via L2TP/IPsec on mac, but connection on windows works

ipsecl2tpmac-osxvpn

I've setup connection on one of our mac computers running MacOS 10.13.6 High Sierra. I've entered user, password, preshared key ect. but I Cant connect to VPN (getting VPN server did not respond error), according to logs, it drops before phase 2 starts. This VPN connection works fine on windows computers. Any Ideas how to fix it? (My firewall on Mac is turned off, tested ports, all good with those as well.
Here is my ppp Log:

Thu Nov 19 13:21:59 2020 : publish_entry SCDSet() failed: Success!
Thu Nov 19 13:21:59 2020 : publish_entry SCDSet() failed: Success!
Thu Nov 19 13:21:59 2020 : l2tp_get_router_address
Thu Nov 19 13:21:59 2020 : l2tp_get_router_address 172.18.11.1 from dict 1
Thu Nov 19 13:21:59 2020 : L2TP connecting to server 'OUR SERVER IP' (OUR SERVER IP)...
Thu Nov 19 13:21:59 2020 : IPSec connection started
Thu Nov 19 13:21:59 2020 : IPSec phase 1 client started
Thu Nov 19 13:21:59 2020 : IPSec phase 1 server replied
Thu Nov 19 13:22:29 2020 : IPSec connection failed

I found that one of the solution might be adding ikelifetime=1h to ipsec.conf file, but I cannot find such file at all. All I could find is /etc/racoon/racoon.conf but there is nothing related to ikelifetime in that file. any help would be appreciated.

Best Answer

I just experienced this same problem, and later realised it was only because I was testing the VPN by connecting to it on the same LAN as the server, using the server's LAN hostname. Once I put in the WAN hostname/address, I stopped receiving this error, and it worked. (I'm also squeezing the last bit of life out of 10.13.6)

Related Topic