L2TP Client Setup
L2TP (Layer 2 Tunneling Protocol) is the most commonly used protocol for MikroTik remote access. It provides a reliable encrypted tunnel.
Before You Start
- You need a MikRouter remote account with an active subscription.
- Open Winbox and connect to your MikroTik router via MAC or IP address.
- Have the remote's
Connect To,PPP UsernameandPPP Passwordready — all three are on its page under your remotes in the dashboard.
The quickest way: paste one command
:do { /interface l2tp-client remove [find name="mikrouter-l2tp"] /interface l2tp-client add name=mikrouter-l2tp connect-to=test.mikrouter.com user=user-l2tp password=pass-l2tp disabled=no :if ([:len [/interface l2tp-client find name="mikrouter-l2tp"]] > 0) do={ :put "MikRouter: L2TP client mikrouter-l2tp added successfully." } else={ :put "MikRouter: ERROR - L2TP client mikrouter-l2tp was not added." } } on-error={ :put "MikRouter: ERROR - could not add the L2TP client mikrouter-l2tp. Check that this RouterOS supports L2TP and try again." }
This script is only a sample — copy the real one from your Quick Setup section.
The terminal confirms it:
MMM MMM KKK TTTTTTTTTTT KKK MMMM MMMM KKK TTTTTTTTTTT KKK MMM MMMM MMM III KKK KKK RRRRRR OOOOOO TTT III KKK KKK MMM MM MMM III KKKKK RRR RRR OOO OOO TTT III KKKKK MMM MMM III KKK KKK RRRRRR OOO OOO TTT III KKK KKK MMM MMM III KKK KKK RRR RRR OOOOOO TTT III KKK KKK MikroTik RouterOS 7.23.3 (c) 1999-2026 https://www.mikrotik.com/ Press F1 for help [admin@hEX] > MikRouter: L2TP client mikrouter-l2tp added successfully. [admin@hEX] >
Prefer to set it up by hand? The steps below do the same thing in Winbox — three tabs and Apply. The values in the pictures are examples; use the Connect To, User and Password from your own remote's page.
Open PPP and press New
Actions
PPP Scanner
Import .ovpn
PPPoE Scan
Configuration
PPTP Server
SSTP Server
L2TP Server
Name it on the General tab
Copy
Actions
Torch
Reset Traffic Counters
| Field | Value | Note |
|---|---|---|
| Name | mikrouter-l2tp | Any name you prefer |
Fill in the Dial Out tab
Copy
Actions
Torch
Reset Traffic Counters
| Field | Value | Note |
|---|---|---|
| Connect To | test.mikrouter.com | Server address from your remote details |
| User | user-l2tp | Your PPP username |
| Password | pass-l2tp | Your PPP password |
No port to set
:port after it.Check the Advanced tab
l2tpv2. Both are the defaults, so usually there is nothing to change — but an unticked method is a common cause of an authentication failure later.Copy
Actions
Torch
Reset Traffic Counters
Press Apply and watch it connect
Copy
✕ Remove
Actions
Torch
Reset Traffic Counters
Verify it in the interface list
R (Running) flag in the first column and a status of connected.Actions
PPP Scanner
Import .ovpn
PPPoE Scan
Configuration
PPTP Server
SSTP Server
L2TP Server
You can also confirm the address the server handed your router under IP›Addresses, on the interface you just named.
Confirm it in your dashboard
MikroTik hEX
4m22s
Remote is available
Expires on one week from today.
Live Connection
Caller IP
203.0.113.45
Location
🇵🇭 Manila, Philippines
ISP
Example Telecom
Organization
Example Telecom Inc.
VPN Credentials
Username
user-l2tp
Password
•••••
Connect To
test.mikrouter.com
Assigned Port
12345
Password shared or exposed? Issue a new one for free. You will need to update the VPN client on your MikroTik afterwards.
Rotate PasswordRemote URL
test.mikrouter.com:12345
Use this address to connect via Winbox, SSH, HTTP, or API.
Need a fresh port? Rotate to a new one for 2 credits. The current port stops working and is retired permanently.
Rotate Port