Server Mikrotik: L2tp
/ip pool add name=vpn-pool ranges=192.168.100.2-192.168.100.100 /ppp profile add name="l2tp-profile" local-address=192.168.100.1 remote-address=vpn-pool dns-server=8.8.8.8 use-encryption=required /interface l2tp-server server set enabled=yes default-profile="l2tp-profile" use-ipsec=yes ipsec-secret=MySecretKey123 /ppp secret add name=admin password=ChangeMe service=l2tp profile="l2tp-profile" /ip firewall filter add chain=input protocol=udp dst-port=500,4500 action=accept /ip firewall filter add chain=input protocol=ipsec-esp action=accept /ip firewall filter add chain=input protocol=udp dst-port=1701 action=accept /ip firewall filter add chain=forward src-address=192.168.100.0/24 action=accept /ip firewall nat add chain=srcnat src-address=192.168.100.0/24 action=masquerade After running, your L2TP/IPsec VPN is ready to use.
/ip pool add name=vpn-pool ranges=192.168.100.2-192.168.100.100 This gives connected clients IPs from 192.168.100.2 to .100. Define settings for VPN clients (DNS, encryption, etc.): l2tp server mikrotik