Hi,
Did you check Use IPsec option in L2TP server configuration ?
Following is the a copy of a configuration that works.
192.168.10.0/24 is office network, 172.30.0.0/24 is for L2TP addresses and 172.31.0.0/24 is remote (teleworker) LAN.
The teleworker is behind a nated router with dynamic public IP address.
Server configuration:
:global IPsecSecret "XXX"
:global L2TPUser "teleworker001"
:global L2TPPass "YYY"
# PPP profil for L2TP server
/ppp profile
add local-address=172.30.0.254 name=prof_L2TP only-one=yes use-compression=yes use-encryption=no use-vj-compression=yes
# L2TP remote user
/ppp secret
add name=$L2TPUser password=$L2TPPass remote-address=172.30.0.1 service=l2tp
# L2TP server
/interface l2tp-server server
set enabled=yes default-profile=prof_L2TP use-ipsec=yes ipsec-secret=$IPsecSecret
# Disable NAT between local network and remote IPsec networks
/ip firewall nat
add chain=srcnat action=accept src-address=192.168.10.0/24 dst-address=172.31.0.0/24 place-before=0
Client configuration:
:global L2TPServer "1.2.3.4"
:global IPsecSecret "XXX"
:global L2TPUser "teleworker001"
:global L2TPPass "YYY"
# L2TP client
/interface l2tp-client
add add-default-route=no allow=pap,chap,mschap1,mschap2 connect-to=$L2TPServer disabled=no \
name=l2tp-out1 password=$L2TPPass profile=default user=$L2TPUser
# Peer IPsec
/ip ipsec peer
add address=$L2TPServer/32 secret=$IPsecSecret
# Policy IPsec
/ip ipsec policy
add dst-address=192.168.10.0/24 sa-dst-address=$L2TPServer src-address=172.31.0.0/24 tunnel=yes
# Do not masquerade to remote network
/ip firewall nat
add chain=srcnat action=accept dst-address=192.168.10.0/24 src-address=172.31.0.0/24 place-before=0