Community discussions

MikroTik App
 
Ajax
just joined
Topic Author
Posts: 7
Joined: Thu Apr 23, 2015 2:27 pm

IPSec/L2TP without NAT

Sun May 24, 2015 1:06 am

Hi everyone

Does anyone know what that could be with subj. protocol that it does connect flawlessly from behind NAT (for example my home network or public in a restaurant with gray IP) but doesn't with public white IP. It is the same device — phone with Android 5.1 and it works great when connected at home by Wi-Fi to home network but doesn't via cellular, with the white IP address.
Would appreciate any hep, thank you.
 
mocando
just joined
Posts: 13
Joined: Thu Jun 26, 2014 1:11 am

Re: IPSec/L2TP without NAT

Mon May 25, 2015 9:40 pm

Hi Ajax,

You have to check with your cell carrier if its blocking L2TP or IPSsec ports. You can make some port test with a free port tester available at Play Store. Compare connecting thru wifi and cell carrier using your vpn server as target host.

Ports to check normally.

For L2TP/IPSec:
Port 500 UDP
Port 4500 UDP
Port 1701 UDP
and
protocol 50 (ESP)

Regards.
 
Ajax
just joined
Topic Author
Posts: 7
Joined: Thu Apr 23, 2015 2:27 pm

Re: IPSec/L2TP without NAT

Tue May 26, 2015 12:28 pm

You can make some port test with a free port tester available at Play Store.
Can you suggest any? I can't find one with UDP port scanning support, they all do TCP scan only.

Will try to check ports, but whenever I try to connect via cellular, router's log getting these records:
12:19:41 firewall,info input: in:wan1 out:(none), proto UDP, 37.73.203.xxx:30619->xxx.xxx.xxx.xxx:500, len 636 
12:19:42 ipsec,error authtype mismatched: my:hmac-md5 peer:hmac-sha1 
12:19:43 l2tp,info first L2TP UDP packet received from 37.73.203.xxx
12:20:01 l2tp,info first L2TP UDP packet received from 37.73.203.xxx
Last one appears several times and phone shows "Can't connect" message.
 
User avatar
pukkita
Trainer
Trainer
Posts: 3051
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: IPSec/L2TP without NAT

Tue May 26, 2015 8:17 pm

this message
12:19:42 ipsec,error authtype mismatched: my:hmac-md5 peer:hmac-sha1 
Is rather odd, how would your carrier change authtype?
 
mocando
just joined
Posts: 13
Joined: Thu Jun 26, 2014 1:11 am

Re: IPSec/L2TP without NAT

Wed May 27, 2015 12:34 am

Hi Ajax,

Try changing in your router Peer Tab, Hash Algorithm md5 to sha1.

Regards...
 
Ajax
just joined
Topic Author
Posts: 7
Joined: Thu Apr 23, 2015 2:27 pm

Re: IPSec/L2TP without NAT

Wed Jun 17, 2015 7:43 pm

this message
12:19:42 ipsec,error authtype mismatched: my:hmac-md5 peer:hmac-sha1 
Is rather odd, how would your carrier change authtype?
It is not a carrier but Android. I couldn't find which type one has. Plus I need to connect using other OSes, like OS X, iOS and Windows.

But problem has been solved (thanks to this link): In your IPsec Peer configuration, change “Generate Policy” from “port strict” to “port override”

Now I've another trouble — despite connection is set and even local IP address is assigned, I can't even ping anything in LAN.