mikrotik and DoH problem after VPN L2TP with IPSec

Hi,

I have an L2TP/IPsec VPN server configured. Additionally, I use ControlD’s cloud DNS service as an alternative to AdGuardHome.

DNS doesn’t work when connected to VPN. i.e. does not resolve names. Both those defined manually for local services and those from the Internet. IP addresses are loading correctly. Even if I change the DNS on the client to different ones, it does not resolve the internet addresses either. Also an issue on Mikrotik’s side. Not ControlD itself.

From the level of the local network, DoH works fine.

Btw. When I used AdGuardHome as an intermediary for ControlD, everything was fine. However, I decided to give it up as I managed to configure DoH on Mikrotik.

I would be very grateful for your help. Unfortunately, I died. And my knowledge of Mikrotik is not very broad.

Here are some screenshots of my configuration.

https://cloud.myhomelab.pl/s/EFqLeoEWM3CnqsL

P.S. RouterOS version latest possible, 7.11.