MikroTik CHR How to set-up L2TP VPN Server. VPN server for Apple devices - Iphone, MacBook. (+ video)

L2TP/IPsec is one of the best-supported VPN protocols for Apple devices — it works natively on iPhone, iPad, and macOS without needing to install a third-party client. This guide walks you through setting up an L2TP/IPsec VPN server on a MikroTik Cloud Hosted Router (CHR) or any physical RouterOS device, covering both WebFig/WinBox and the RouterOS CLI.

Heads up: L2TP support has been dropped in many newer Android phones (varies by manufacturer). While L2TP/IPsec is significantly more secure than PPTP, it is still an aging protocol. For new deployments we recommend OpenVPN (RouterOS v6+) or WireGuard (RouterOS v7+), both of which offer a more modern, always-on VPN experience across all platforms.

Here's a short video walkthrough of the whole process:

Before you start: You'll need a MikroTik CHR instance (or physical RouterOS device) with a public IP address. If you're looking for a CHR, check out BGOCloud's MikroTik VPS plans — they're deployed in under a minute. Before configuring any VPN server, it's also worth hardening your router first. Follow our MikroTik CHR basic security guide if you haven't done so already, and make sure RouterOS is updated to the latest stable release.

The diagram below gives an overview of the network we're building — a MikroTik router with a public IP acting as the VPN gateway, with L2TP clients tunnelling into the private 10.1.101.0/24 network:

L2TP/IPsec network diagram showing a MikroTik router with a public IP connecting remote L2TP clients across the internet to a private 10.1.101.0/24 LAN with three workstations

1
Create a bridge interface for the L2TP network

We start by creating a dedicated bridge interface that will serve as the local network gateway for L2TP clients. If you already have a bridge and a private IP subnet on your router, you can skip ahead to Step 3 — there's no need to create a second one.

In WinBox or WebFig, go to Bridge, click New, and name it l2tp-bridge:

WinBox Bridge window with the New button highlighted to create a new bridge interface New bridge interface dialog in WinBox/WebFig with name field set to l2tp-bridge

Once created, the new bridge appears in the Interfaces list:

RouterOS Interfaces tab showing the newly created l2tp-bridge interface listed alongside ether1 and lo

RouterOS CLIinterface bridge add name=l2tp-bridge
2
Assign an IP address to the bridge

The bridge needs an IP address — this becomes the local gateway that VPN clients will route through. Go to IP > Addresses, click New, enter 10.1.101.1/24 as the address, and assign it to the l2tp-bridge interface. If your existing network already uses a different subnet, use that instead — just update the IP pool range in the next step to match.

RouterOS IP > Addresses > New dialog showing address 10.1.101.1/24 being assigned to the l2tp-bridge interface RouterOS IP Addresses list showing 10.1.101.1/24 assigned to l2tp-bridge and the public IP on ether1

RouterOS CLIip address add address=10.1.101.1/24 interface=l2tp-bridge
3
Create an IP pool for VPN clients

The IP pool determines which addresses get handed out to connecting L2TP clients. We'll keep it within the same subnet as the bridge — 10.1.101.50–10.1.101.100 gives us room for 51 concurrent VPN sessions, which is plenty for most use cases.

Go to IP > Pool, click New, name it L2TP, and enter the address range:

RouterOS IP > Pool section in WebFig showing the IP Pool list with the New button to add a pool New IP Pool dialog in RouterOS WebFig with name L2TP and address range 10.1.101.50-10.1.101.100 entered

RouterOS CLIip pool add name=L2TP ranges=10.1.101.50-10.1.101.100
4
Enable the L2TP server with IPsec

Go to PPP, then click L2TP Server in the Interface tab (or the side menu in WebFig). Enable the server and configure it as follows:

  • Enabled: yes
  • Default Profile: default-encryption
  • Authentication: chap, mschap1, mschap2, pap
  • Use IPsec: yes
  • IPsec Secret: a strong shared secret of your choice (replace the example below)
IPsec is essential. Without it, L2TP traffic travels unencrypted. Always enable IPsec and choose a strong, unique pre-shared secret — never use obvious values like the example below in a real environment.

MikroTik RouterOS PPP window with the L2TP Server option highlighted in the Configuration side menu L2TP Server dialog in RouterOS with Enabled toggle on, Default Profile set to default-encryption, Authentication protocols chap/mschap1/mschap2/pap checked, Use IPsec set to yes, and IPsec Secret field filled

RouterOS CLIinterface l2tp-server server set enabled=yes default-profile=default-encryption use-ipsec=yes ipsec-secret=YourStrongSecret authentication=chap,mschap1,mschap2,pap
5
Edit the default-encryption PPP profile

Rather than creating a new profile, we edit the built-in default-encryption profile to point it at our bridge and IP pool. Go to PPP > Profiles, double-click default-encryption, and set:

  • Local Address: 10.1.101.1 (the bridge IP from Step 2)
  • Remote Address: L2TP (the pool from Step 3)
  • DNS Server: 1.1.1.1, 1.0.0.1 (or your preferred servers)
  • Bridge: l2tp-bridge

RouterOS PPP Profiles tab showing default-encryption profile selected in the list Editing the default-encryption PPP profile in RouterOS — Local Address 10.1.101.1, Remote Address L2TP pool, Bridge l2tp-bridge, DNS servers 1.1.1.1 and 1.0.0.1 configured

RouterOS CLIppp profile set default-encryption local-address=10.1.101.1 remote-address=L2TP dns-server=1.1.1.1,1.0.0.1 bridge=l2tp-bridge

(Optional) Use the CHR itself as the DNS server for VPN clients

Instead of pointing clients at a public DNS like Cloudflare, you can forward DNS through your CHR. This unlocks a few useful features: you can create static DNS entries for internal hostnames, and you can use MikroTik's built-in Adlists feature to block ads and trackers network-wide for all VPN users.

To do this, first enable DNS forwarding on the CHR. Go to IP > DNS and check Allow Remote Requests:

RouterOS IP > DNS settings dialog with Allow Remote Requests checkbox enabled to allow VPN clients to use the CHR as their DNS server

RouterOS CLIip dns set allow-remote-requests=yes

Then go back to the default-encryption profile and change the DNS Server field to 10.1.101.1 (the bridge address). To keep your CHR from being used as an open resolver from the internet, tighten the DNS firewall rule from our security guide so it only allows port 53 from your VPN subnet.

6
Create a VPN user account (PPP Secret)

Go to PPP > Secrets, click New, and add your first VPN user. Set the service to l2tp to restrict this account to L2TP only, and make sure the profile is set to default-encryption. Use a strong, unique password — the example below is just a placeholder.

RouterOS PPP Secrets tab with the New button highlighted to create a new VPN user account New PPP Secret dialog in RouterOS with username bgocloud, password field, service set to l2tp, and default-encryption profile selected

RouterOS CLIppp secret add name=user1 password=StrongPassword profile=default-encryption service=l2tp comment="First User"
7
Enable NAT masquerading for internet access

Without this rule, VPN clients will be able to reach the router but won't have outbound internet access. The masquerade rule rewrites the source address of traffic leaving through your WAN interface, making return traffic route back correctly.

Go to IP > Firewall > NAT, click New, and set chain to srcnat, out-interface to ether1 (or whichever interface carries your WAN), and action to masquerade:

RouterOS IP > Firewall window with the NAT tab active and the New button highlighted to create a masquerade rule New NAT rule dialog in RouterOS WebFig with chain srcnat, out-interface ether1 set in the General tab, and action masquerade selected in the Action tab

RouterOS CLIip firewall nat add chain=srcnat out-interface=ether1 action=masquerade
8
Allow L2TP/IPsec traffic through the firewall

If your CHR uses a restrictive firewall (such as the one from our basic security guide), you need two explicit accept rules to let L2TP/IPsec traffic through. Without them, incoming VPN connections will be silently dropped.

Go to IP > Firewall > Filter Rules and add the following two rules:

  • Rule 1 — L2TP: chain input, protocol udp, dst-port 500,1701,4500, action accept
  • Rule 2 — IPsec encapsulation: chain input, protocol ipencap, action accept

RouterOS IP Firewall Filter Rules list showing existing rules and the New button to add an L2TP accept rule New firewall filter rule in RouterOS for IPsec — chain input, protocol ipencap, action accept, comment IPSec Pass New firewall filter rule in RouterOS for L2TP — chain input, protocol UDP, destination ports 500/1701/4500, action accept, comment L2TP VPN

Both new rules land at the bottom of the firewall list — below any drop rules, where they won't be reached. Drag them above the first blocking rule to make them active:

Animation showing the two L2TP firewall rules being dragged above the drop-everything rule in the MikroTik firewall filter list

For CLI users, print all existing rules first to identify the drop rule number, then insert both accept rules above it using place-before. Replace X with that rule's number:

RouterOS CLIip firewall filter print all without-paging
--- Firewall rules output ---
ip firewall filter add chain=input action=accept comment="IPSec Pass" protocol=ipencap place-before=X
ip firewall filter add chain=input action=accept comment="L2TP VPN" protocol=udp dst-port=500,1701,4500 place-before=X
9
Create L2TP server interface bindings (optional)

By default, each connected L2TP client gets a dynamically named interface. Interface bindings let you assign a fixed name to a specific user's connection, which makes it straightforward to reference that connection in firewall rules, apply per-user rate limits, or track their traffic over time.

Go to Interfaces, click New, choose L2TP Server Binding from the type list, give it a name, and set the User field to the PPP Secret username:

RouterOS Interface list with the New dropdown open showing L2TP Server Binding as an option to create a static binding for an L2TP user New L2TP Server Binding dialog in RouterOS with name l2tp-in1, type L2TP Server Binding, and user set to bgocloud

RouterOS CLIinterface l2tp-server add name=l2tp-in1 user=user1

That's it — your MikroTik router is now running a fully functional L2TP/IPsec VPN server. Apple devices (iPhone, iPad, Mac) can connect using the built-in VPN client with no additional software required. The same setup works on both MikroTik CHR instances and physical RouterOS devices.

Need a MikroTik CHR to run your VPN server on? BGOCloud's MikroTik VPS plans give you a fully licensed Cloud Hosted Router with a dedicated public IP, SSD-backed performance, and flexible traffic options — deployed in under a minute. Everything in this guide runs out of the box.

Get reliable website hosting services starting at only $3.12/mo

Get Started!
icon knowledge

Related Articles

MikroTik CHR Licensed - Applying the included license (+ video)

This article applies only to the MikroTik Cloud Hosted Router — Licensed or higher packages,...

MikroTik CHR: How to set-up The Dude Monitoring

This article will help You deploy cloud-based network and infrastructure monitoring tool: The...

How-To: Configuring WireGuard in MikroTik CHR - Faster and secure VPN protocol

If you are looking to set up a fast, modern VPN server on your MikroTik router or Cloud...

How to: Backup your MikroTik CHR configuration with Oxidized.

Oxidized is a great tool for backing up network configs without all the manual work. It’s written...