9

Have troubles with connecting to my VPN from Mac. Using default Mac client, pre-shared secret. Also this works well on iOS 10.3.2 from the same Wi-Fi network.

Firewall is disable, no Little Snitch. macOS error message says 'The L2TP-VPN server did not respond'

Also, I've tried to connect open free VPN, us.freel2tpvpn.com and got no response again, so I think it's a macOS problem, not the server / routing.

Do you have any ideas?

Here is my /var/log/ppp.log

Tue Jun 13 15:34:58 2017 : publish_entry SCDSet() failed: Success!
Tue Jun 13 15:34:58 2017 : publish_entry SCDSet() failed: Success!
Tue Jun 13 15:34:58 2017 : l2tp_get_router_address
Tue Jun 13 15:34:58 2017 : l2tp_get_router_address 172.16.21.1 from dict 1
Tue Jun 13 15:34:58 2017 : L2TP connecting to server '86.102.88.210' (86.102.88.210)...
Tue Jun 13 15:34:58 2017 : IPSec connection started
Tue Jun 13 15:35:03 2017 : IPSec connection failed

update 1 checked udp ports 500, 1701, 4500 — all open from mac

update 2 set up another l2tp ipsec preshered secret server on windows and got same result — don't respond on mac, connected on iphone

update 3 wiresharked booth on 'connections', and there is no udp packets from mac on connection, but test packets are ok.

definitely the mac vpn client is broken (firewall is off), where should I dig?

2
  • i have the same problem as well. After update my system my l2tp connection broken. I have my own vpn server. Im using softether vpn on ubuntu. I can connect with my ios 10 devices on same wifi but my 10.12.6 MacOS is not connecting.
    – EFE
    Jul 31, 2017 at 22:06
  • Same problem here. Checked all the ports → all open! On various iPhones and iPads it works just fine. Just on 10.12.6 it cannot connect.
    – Luke
    Sep 26, 2022 at 17:04

2 Answers 2

8

First step: Ensure that outgoing L2TP connections work properly. To do that, run the following commands in Terminal (you can copy and paste if you want):

/usr/bin/nc -uvw5 portquiz.net 500
/usr/bin/nc -uvw5 portquiz.net 1701
/usr/bin/nc -uvw5 portquiz.net 4500

You should get something that looks like this (note the three "succeeded" lines):

found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
    outif en0
    src 192.168.1.2 port 56916
    dst 178.33.250.62 port 500
    rank info not available
    TCP aux info available

Connection to portquiz.net port 500 [tcp/isakmp] succeeded!
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
    outif en0
    src 192.168.1.2 port 56917
    dst 178.33.250.62 port 1701
    rank info not available
    TCP aux info available

Connection to portquiz.net port 1701 [tcp/l2f] succeeded!
found 0 associations
found 1 connections:
     1: flags=82<CONNECTED,PREFERRED>
    outif en0
    src 192.168.1.2 port 56918
    dst 178.33.250.62 port 4500
    rank info not available
    TCP aux info available

Connection to portquiz.net port 4500 [tcp/ipsec-msft] succeeded!

If that works, then you should be able to connect, and the problem is likely the server, or a configuration problem (I've used the macOS L2TP client for a long time and haven't experienced any issues). If not, something is blocking an outgoing port.

10
  • Got the refused all the time, tried my l2tp server, and few free online l2tp services, which I also can't connect (same error — refused). As far as I know, L2TP uses udp ports, so tcp port testing may be not enough.
    – Lamak
    Jun 13, 2017 at 10:21
  • Whoops, forgot -u. Now it'll test UDP Jun 13, 2017 at 10:39
  • 1
    all succeeded. I've restarted 'racoon' daemon, but no change.
    – Lamak
    Jun 13, 2017 at 11:01
  • 1
    I assume you've reentered your credentials numerous times already, if you're at this point... Strange. Jun 13, 2017 at 11:04
  • What I would do at this point is use Wireshark on the VPN concentrator (server) to determine exactly what the iOS and macOS clients are doing differently. Things look to be failing before encryption's set up, which means you could gain some insight that way. Have you used Wireshark before? Jun 13, 2017 at 11:09
2

A bit of a me too answer but I experienced the exact same behaviour in macOS Mojave 10.14.3.

The built-in L2TP client fails immediately. VPN Connection failure message No packets sent, pretty much the same log entries in ppp.logas the OP.

The only resolution for us was to use a third-party VPN client. We use Shimo, and it works well (we have no affiliation with them). It's a pity the native client does not work.


Update 2020-10-01:

I tried this again in macOS Catalina 10.15.6 and it works!

No need for Shimo anymore.


Update 2020-10-02:

Still works in macOS Catalina 10.15.7

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .