Page 1 of 1

iPhone connection fails

Posted: Mon Jan 18, 2021 11:56 pm
by LambdaEnt
Trying this again. Works with Mac and Windows clients. Will NOT work with iOS: VPN Connection fails.

If I do not enter a password on the iPhone, a dialog pops up asking for the password, so it IS communicating with the server, but it fails authentication.

Forwarded UDP ports: 139, 443, 500, 4500

Re: iPhone connection fails

Posted: Tue Jan 19, 2021 11:15 am
by cedar
If you open UDP/139, there is a high risk of being attacked, so close it immediately.
People all over the world can see your file share.

UDP / 443 is also not used, so let's close it.

It seems that the authentication settings are incorrect.
If you don't show me your settings, I won't know the cause.

Re: iPhone connection fails

Posted: Tue Jan 19, 2021 5:50 pm
by LambdaEnt
Thank you. I have closed those ports.

Here are some screen shots. iPhone is using L2TP. I have tried different encryption settings, none have worked with iOS. All work just fine with the desktops.

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 2:51 am
by cedar
Since the problem occurs only on the iPhone, I think it is a setting problem on the iPhone side.
Is there a setting screen on the iPhone side?

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 3:39 am
by LambdaEnt
Here's the screen. There's not much to it.

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 3:55 am
by cedar
The secret must always be specified.

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 4:38 am
by LambdaEnt
Both Password and Secret are filled in. Screen capture automatically blanks it out for security.

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 4:45 am
by cedar
Is there any message recorded in the server log of the VPN server when the connection fails?

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 4:56 am
by LambdaEnt
I just now attempted to connect with the iPhone, which failed as before. The log recorded this:

2021-01-19,19:58:26.131,SID-LOCALBRIDGE-1,-,784561C36469,FFFFFFFFFFFF,0x0800,364,DHCPv4,Request,0.0.0.0,bootpc(68),255.255.255.255,bootps(67),-,-,TransactionId=1143420210 ClientIP=0.0.0.0 YourIP=0.0.0.0 ServerIP=0.0.0.0 RelayIP=0.0.0.0,-,-,-

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 4:58 am
by cedar
It seems to be part of the packet log.
There may be a record of incoming VPN connections in the server log.

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 5:22 am
by LambdaEnt
I’ll check into it tomorrow and post it then. Thanks for your help.

Re: iPhone connection fails

Posted: Wed Jan 20, 2021 7:38 pm
by LambdaEnt
I just attempted to connect from the iPhone again. It failed, as usual.

But there was nothing at all generated in the server log.

Re: iPhone connection fails

Posted: Thu Jan 21, 2021 1:33 am
by cedar
Does your iPhone use the same network environment as other clients that successfully connect?
Your ISP can block IPsec, so please try using WiFi to match the network conditions with other clients.

Re: iPhone connection fails

Posted: Thu Jan 21, 2021 8:06 am
by LambdaEnt
Yes. Same network and router as my desktop that’s working just fine. I’ve tried it using cellular, too.

Re: iPhone connection fails

Posted: Thu Jan 21, 2021 8:24 am
by cedar
Are the iPhone and VPN Server on different networks?
If they are on the same, you may be in a hairpin NAT state.

It is also possible that there is a problem with the DNS settings.
Can you access the VPN Server from your iPhone browser?

Re: iPhone connection fails

Posted: Thu Jan 21, 2021 8:38 am
by LambdaEnt
I am connecting to the office where the server is, from my home desktop and iPhone. So, no, they are not in the same network.

I can connect using RemotePC and other software. It is not a DNS issue.

Re: iPhone connection fails

Posted: Thu Jan 21, 2021 9:25 am
by LambdaEnt
Well, I just found the answer. iPhone does not like some non-alphanumeric characters, in this case a " (quote) in the Secret key. Changed it to a different character and voila!