Tailscale on MikroTik
INTRO
Tailscale is a WireGuard-based VPN that focuses on simplicity and ease of use. By creating secure VPN connections between user devices without the need to open firewall ports, Tailscale is an incredibly user-friendly VPN solution. The purpose of this tutorial is to highlight one specific use: installing it on a MikroTik router to carry a Layer 2 tunnel over Tailscale.
WHY BRIDGE LAYER 2?
Occasionally two devices in different locations need to behave as if they share the same physical segment, for example equipment that only discovers or manages its peers over Layer 2. Bridging over Tailscale provides that without exposing any ports to the internet. The first half of this guide covers installing Tailscale on a MikroTik, which is useful on its own; MikroTik routers offer a remarkable amount of capability for their size and cost.
PLANNING
First, come up with a network diagram. You will need to plan out four main subnets: your LAN, your container network, the WireGuard tunnel subnet, and the EoIP tunnel subnet.
PREREQUISITES
Before you can install Tailscale on your MikroTik, ensure you have the following:
- A MikroTik router running RouterOS v7
- WinBox installed on a computer with an Ethernet port
- Internet connectivity for downloading Tailscale
- Time to plan and test; this setup rewards patience
SETTING UP THE MIKROTIK
Initial install will go as follows:
- Install WinBox on your computer
- Connect to the MikroTik via Ethernet cable to ether3
- Set up a WireGuard interface on the MikroTik to use with Tailscale
- Set up an EoIP tunnel to bridge the WireGuard interface to your LAN
- Set up routing and firewall rules as needed