I have two Mikrotik routers. I created L2TP server on the first router and L2TP client on the second router. I added routes and I can successfully ping all the devices from one router to another.
However when I enable IPsec on both the server and the client the L2TP stops, and I can not ping devices anymore.
I followed guides in Mikrotik wiki with slight variations.
This is my first time using Mikrotik products and the first time creating such a setup in general.
On the L2TP server I added user through /ppp secret add name=...
And enabled L2TP server with /interface l2tp-server server set enabled=yes
I also added filters for the firewall and routes.
On the L2TP client I added a user
/interface l2tp-client add user=...
L2TP connection is successful as I can see in the logs and also I am able to ping everything.
Then to enable IPsec I set
/interface l2tp-server set use-ipsec=yes ipsec-secret=thesecret
and afterwards the same thing on the client
/interface l2tp-client set use-ipsec=yes ipsec-secret=thesecret
This is what I see in the logs on the server side when I enable set use-ipsec=yes on the client router
10:38:55 l2tp,ppp,info <l2tp-RouterAsClient>: terminating...
10:38:55 l2tp,ppp,info,account RouterAsClient logged out, 424 1122 58 15 7
10:38:55 l2tp,ppp,info <l2tp-RouterAsClient>: disconnected
10:38:55 ipsec,info respond new phase 1 (Identity Protection): 188.8.131.52<=>184.108.40.206
10:38:56 ipsec,info ISAKMP-SA established 220.127.116.11-18.104.22.168 spi:8d04c53fc25d46d8:f79f26d925c91be5