I configured L2TP+IPsec using your suggestions. It seems that the packtes are now delivered to the Mikrotik router.
Nevertheless I get no connection (Log):
l2tp info: First L2TP UDP packet received from 80.x.x.x
IPsec error: phase 1 negotiation failed due to time up
Is it possible that L2TP is not working because my crappy provider router is not able to forward ESP? I’m only able to forward TCP and UDP (500, 1701 and 4500)
For IPSec server located behind ISP router, you need to forward UDP 500, 4500 and ESP.
For phase1 issues, enabled “ipsec,debug” logs and post them here.
If both of them are behind NAT, this will happen. You need to make the tunnel on the router, instead of the client, or wait for new Kernel in RouterOS v7
sorry for re-raising this topic - but I still have a few questions about this.
Same scenario for myself:
I want to connect multiple! iOS/macOS/Android devices to my MikroTik router.
iOS >10 should support these protocols (all combined thankfully with IPsec encryption):
L2TP/IPSec
IKEv2/IPSec
Cisco IPSec
(my last resort would be a separate OpenVPN client app on each device, but i’d like it more to use an integrated OS solution)
Which VPN server setup do you recommend for mixed devices - “one-size-fits-all” ?
Did I get this right, that if my MikroTik router has a public IP address (no NAT/directly connected via PPPoE to a DSL modem), I can connect multiple devices with NAT e.g. via L2TP with IPsec? (instead of only 1 connection if both/server+client are NAT’d)
I had issues in the past, trying to configure L2TP+IPsec for any device (Mac, Windows or iOS), since there are various instructions out there, how to configure L2TP+IPsec - one tutorial says “check ‘use IPsec’ within the L2TP Server setup” .. another one says “this won’t work - create your own policy include ‘3des’” - which won’t work for iOS devices.
=> So is there any general instruction set for a viable L2TP+IPsec setup (e.g. for various devices like iOS, macOS, Windows, etc. aside) - or can I/do I have to configure multiple policies for all device sets?
Sorry - I’m a little bit slow in understanding this one ..
Let’s assume all clients (personal devices) are behind some/whatever NAT, e.g. cell network/other personal Wi-Fi/… (no MikroTik here).
The MikroTik router (hosting the L2TP/IPsec VPN server) acts as gateway router (directly connecting to the public internet via a PPPoE client) so the eth1-WAN interface will have the public IP address.
=> In this scenario multiple clients will be able to connect to the MikroTik VPN?
So, I actually need to skip “/ip ipsec peer” step at all?
Anyway, can’t get this working.
On router (RouterOS v6.36.3, 1100AHx2) there are errors like this:
19:11:17 ipsec,debug,packet such policy does not already exist: xxx/32[38126] xxx/32[1701] proto=udp dir=in
19:11:17 ipsec,debug,packet such policy does not already exist: xxx/32[1701] xxx/32[38126] proto=udp dir=out
on client (macOS Sierra):
Thu Sep 22 19:11:17 2016 : L2TP sent SCCRQ
Thu Sep 22 19:11:37 2016 : L2TP cannot connect to the server
I tried both suggestions - 1) with a dedicated IPsec peer configuration for the secret .. and 2) using the integrated IPsec checkbox of the L2TP server with a secret.
Both ways don’t work in my case (just to keep it in mind: I have both sides / RouterOS server+MacOS client NATed)