# MikroTik controller with AP connected via VLAN interface

**URL:** <https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75>\
**Category:** Networking\
**Tags:** mikrotik, ubiquiti, vlan, unifi\
**Created:** [June 11, 2024, 2:25pm UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75 "2024-06-11T14:25:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex\_koskov](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@alex\_koskov](https://forum.powerlynx.app/u/alex_koskov)\
**Post date:** [June 11, 2024, 2:25pm UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/1 "2024-06-11T14:25:08Z")

</div>

In this topic, we are going to show an example of VLAN configuration to use a hotspot server with Powerlynx. For this example, we have used a MikroTik hap ac lite as the controller and a Unifi AP AC Lite as the access point. You can use other APs from different vendors as well.

It is crucial to know that the general configuration must be done on the MikroTik device, which has a Wireguard connection (you can use a Public IP if you have one) with Powerlynx, configured as a Radius-client with a hotspot server. You need to configure the MikroTik as we have shown in our documentation: [MikroTIk Advanced setup](https://docs.powerlynx.app/networking/mikrotik.html). However, there is a small difference: you need to assign a VLAN interface on the hotspot server. On the AP device, we need to adopt it and configure only the Wi-Fi network, not enabling the guest portal on it.

> **Note:** Do **not** use the [Simple setup](https://docs.powerlynx.app/networking/mikrotik.html#simple-setup) **“Full setup”** if you want to integrate VLAN interfaces. Instead, use only **“Simple setup: Setup VPN”** , which generates a script to establish a WireGuard connection on your MikroTik hotspot controller.
> 
> After that, you should proceed with the steps shown below.

**Simple setup: Setup VPN** :

 ![Screenshot from 2025-05-27 12-25-18](https://forum.powerlynx.app/uploads/default/original/1X/a9f150c7643b9cb85e1e8fb9c6c8ee84675e78c2.png)

 ![Screenshot from 2025-05-27 12-25-31](https://forum.powerlynx.app/uploads/default/original/1X/cebe02b2af0ba68ff3e83404292faef79fbc2413.png)

First of all, we need to connect our MikroTik to Powerlynx and configure the Radius-client (in this example, we use a Wireguard connection).

 ![Screenshot from 2024-06-11 14-26-30](https://forum.powerlynx.app/uploads/default/original/1X/e0abff89b88626ba78ff6ac92c691b31bdb4e790.png)

After that, we can create a bridge interface, which includes two Ethernet interfaces (one for the AP, another for the Unifi controller). In our example, ether3 is used for the laptop controller for the Unifi device, and ether4 is used to connect the Unifi AP AC Lite.

 ![Screenshot from 2024-06-11 14-35-21](https://forum.powerlynx.app/uploads/default/original/1X/399307e23771c78de0fd8d994c2641655a91d977.png)

 ![Screenshot from 2024-06-11 14-35-45](https://forum.powerlynx.app/uploads/default/original/1X/446cf8cb0d45bb74064a6307f0acf375ac224c34.png)

Now we are ready to create a VLAN interface on the bridge port: go to Bridge \> VLANs \> click “+”. You have to choose your bridge port.

 ![Screenshot from 2024-06-11 14-44-17](https://forum.powerlynx.app/uploads/default/original/1X/0bd8ade89ec3ef1aeb0d8ccd6e73298b93c096c2.png)

- **Bridge** - choose your bridge interface created for hotspot server;

- **VLAN IDs** - set VLAN id you want to use;

- **Tagged** - choose your bridge interface and interfaces which are connected to another routers or switches, that work with [IEEE 802.11Q standard](https://en.wikipedia.org/wiki/IEEE_802.1Q);

- **Untagged** - choose interfaces that are connected to end-devices (laptops, some APs and etc.).

Then go to `Interface>VLAN>click "+"`.

 ![Screenshot from 2024-06-11 15-09-07](https://forum.powerlynx.app/uploads/default/original/1X/5234a4a732f682d2ee01f0fbb30f75de7afe3cd0.png)

- **Name** - set the name for VLAN interface;
- **VLAN ID** - set the same VLAN ID;
- **Interface** - choose your bridge interface.

After that, we can create our hotspot server on the VLAN interface. I recommend using the `"Hotspot Setup"` tool. The configuration of the hotspot server is the same as we have shown in our documentation.

 ![Screenshot from 2024-06-11 17-20-01](https://forum.powerlynx.app/uploads/default/original/1X/ce749e4f08442c0f4496f2a733de0e3e1000781c.png)

Now we need to change the value of `PVID` for our slave ports in the bridge interface. Go to `Bridge > Ports > choose port > VLAN` and set the same VLAN ID.

 ![Screenshot from 2024-06-11 15-43-50](https://forum.powerlynx.app/uploads/default/original/1X/67a938f9be1a66cd141144c09ab12a2c09db6e4b.png)

Now it is crucial to enable VLAN-Filtering for our bridge interface. There is no need to change the PVID for that interface.

 ![Screenshot from 2024-06-11 15-49-38](https://forum.powerlynx.app/uploads/default/original/1X/b8d953e8cf9f6791cbe2bafa5d639e432dd23520.png)

In our case, we have an unadopted Unifi device and a controller that is hosted locally on our laptop. To adopt the Unifi AP, these devices must be in the same hotspot network. To adopt it properly and have the ability to ping, I have added these devices to the `bypass list`. To do this, you can use the MAC Address or IP Address (I recommend to use MAC Address).

![Screenshot from 2024-06-11 16-49-29](https://forum.powerlynx.app/uploads/default/original/1X/c88ce8ee7af6ed34994965bcf6294c33b433628c.png)

Make sure your AP gets an IP address from the correct IP range and is located in the correct VLAN ID.

 ![Screenshot from 2024-06-11 16-58-41](https://forum.powerlynx.app/uploads/default/original/1X/db947949f6f7576c399b55ab6dda3ee83d0c0a57.png)

Then adopt your AP device and create a Wi-Fi network on it.

 ![Screenshot from 2024-06-11 16-50-21](https://forum.powerlynx.app/uploads/default/original/1X/1233cb88a511e605cbba2af419eeeff5e4f912ca.png)

 ![Screenshot from 2024-06-11 17-03-49](https://forum.powerlynx.app/uploads/default/original/1X/ae9f7dd00ea007e4d2efea92e61b51d435acd1d6.png)

Don’t forget to customize login.html and add some hosts to Walled Garden list on your MikroTik device.

---

<div class="post-metadata">

**Author:** ![Lehana](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/l/c67d28/32.png) [@Lehana](https://forum.powerlynx.app/u/Lehana)\
**Post date:** [May 28, 2025, 10:34am UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/2 "2025-05-28T10:34:03Z")

</div>

How would this be implemented in a cloud hosted controller?

---

<div class="post-metadata">

**Author:** ![alex\_koskov](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@alex\_koskov](https://forum.powerlynx.app/u/alex_koskov)\
**Post date:** [June 3, 2025, 1:16pm UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/3 "2025-06-03T13:16:53Z")

</div>

Hello Lehana,

It depends on where your MikroTik CHR is located. If your MikroTik CHR is hosted on a VPS (e.g., AWS, DigitalOcean, etc.), you can connect your Ubiquiti AP (or other devices) via a VPN tunnel or EoIP. You can use one of the following network topologies:

**Powerlynx → Hotspot Controller (MikroTik CHR) → AP Device(s)**  
**Powerlynx → Hotspot Controller (MikroTik CHR) → Proxy Device → AP Device(s)**

**Proxy Device:** This is a device used to establish a VPN tunnel with the hotspot controller and can serve as a gateway for the AP devices.

We can show you an example from our side later.

---

<div class="post-metadata">

**Author:** ![craig34](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/c/258eb7/32.png) [@craig34](https://forum.powerlynx.app/u/craig34)\
**Post date:** [June 17, 2025, 10:12am UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/5 "2025-06-17T10:12:20Z")

</div>

My scenario is, I assume fairly similar to Lehana’s. I have my Mikrotik router on site and the AP’s connected as a mesh from say ether2. My controlller is on DO under ubuntu server lts24. Can I install Mikrotik CHR on the same server and create the connection?

---

<div class="post-metadata">

**Author:** ![alex\_koskov](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@alex\_koskov](https://forum.powerlynx.app/u/alex_koskov)\
**Post date:** [June 17, 2025, 2:42pm UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/6 "2025-06-17T14:42:28Z")

</div>

**Hello Craig,**

Unfortunately, we cannot guarantee that such a setup will be fully accessible or feasible.

**Theoretically** , you can install MikroTik CHR on the same Ubuntu server **as long as you use virtualization** (e.g., KVM or VirtualBox) or containerization (e.g., Proxmox, LXD, or Docker with nested virtualization support).

Here are some potentially useful links:

- [GitHub - EvilFreelancer/docker-routeros: This project provides a Docker image that runs a MikroTik RouterOS virtual machine inside QEMU. · GitHub](https://github.com/EvilFreelancer/docker-routeros)
- [Real Docker images for CHR to run in Containerlalb - Virtualization - MikroTik community forum](https://forum.mikrotik.com/t/real-docker-images-for-chr-to-run-in-containerlab/181934)
- [https://www.youtube.com/watch?v=WR2j0aXUfj4&ab\_channel=MarcoBoschiniCorsiMikroTik](https://www.youtube.com/watch?v=WR2j0aXUfj4&ab_channel=MarcoBoschiniCorsiMikroTik)

However, we haven’t tested this kind of setup ourselves, so we **cannot recommend it or guarantee** that it will work 100%.

### **Alternative Approach**

You can create a **separate MikroTik CHR VPS** on a cloud provider (e.g., AWS, Google Cloud, Hetzner, etc.).  
More information is available here:

> **[How to Install a virtual RouterOS system with CHR images - Cloud Hosted Router,...](https://help.mikrotik.com/docs/spaces/ROS/pages/18350234/Cloud+Hosted+Router+CHR#CloudHostedRouter%2CCHR-HowtoInstallavirtualRouterOSsystemwithCHRimages)**
>
> We provide 4 different virtual disk images to choose from. Note that they are only disk images, and you can't simply run them.

For example, you can create a **free-tier instance on AWS** to test MikroTik CHR with a free license.  
Here’s a video guide on how to do that:

[![](https://forum.powerlynx.app/uploads/default/original/1X/610dffe59d6b911762481a476cecd34ad5ceae08.jpeg "Run MikroTik on Amazon Web Services") ](https://www.youtube.com/watch?v=ho9K02s4UUw)

---

<div class="post-metadata">

**Author:** ![KingTony](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/k/e5b9ba/32.png) [@KingTony](https://forum.powerlynx.app/u/KingTony)\
**Post date:** [July 30, 2026, 11:25am UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/7 "2026-07-30T11:25:56Z")

</div>

Hi Lehana,

Did you manage to come right on this scenario?

I can connect Unifi APs managed via cloud hosted controllers.

---

<div class="post-metadata">

**Author:** ![KingTony](https://forum.powerlynx.app/letter_avatar_proxy/v4/letter/k/e5b9ba/32.png) [@KingTony](https://forum.powerlynx.app/u/KingTony)\
**Post date:** [July 30, 2026, 11:27am UTC](https://forum.powerlynx.app/t/mikrotik-controller-with-ap-connected-via-vlan-interface/75/8 "2026-07-30T11:27:30Z")

</div>

Hi Craig,

Did you manage to resolve this scenario for your setup?
