Mikrotik L2tp Server Setup [updated] Full

MikroTik L2TP/IPsec Server Setup: The Complete Guide

Objective: To securely connect remote clients (Windows, macOS, iOS, Android) to your MikroTik LAN using L2TP over IPsec. This guide covers configuration from IP pool creation to firewall rules and client export.

macOS / iOS

3. The Firewall (The Gatekeeper)

5.3 Associate the proposal with a policy

/ip ipsec policy add src-address=0.0.0.0/0 dst-address=0.0.0.0/0 sa-src-address=YOUR_WAN_IP sa-dst-address=0.0.0.0/0 protocol=udp proposal=l2tp-proposal template=yes

Replace YOUR_WAN_IP with your actual public IP (e.g., 203.0.113.5). If you have a dynamic IP, you can use 0.0.0.0 but it’s less secure. Better to use a script to update it or set a DDNS hostname (RouterOS supports DDNS). mikrotik l2tp server setup full


Security Best Practices

  1. Change the default PSK – Do not leave YourStrongPreSharedKey.
  2. Use long, complex PSK (20+ characters, mix of letters/numbers/symbols).
  3. Limit login attempts – Use ppp profile idle-timeout.
  4. Update RouterOS – Always run latest stable version.
  5. Disable weak ciphers – Use only AES-256, SHA256, and modp2048 or higher.