This setup guide is applicable for most MikroTik routers and RouterOS devices, specifically RB3011UiAS-RM, RB2011UiAS-2HnD-IN, RB2011UiAS-RM, RB951G-2HnD, RB951Ui-2HnD, hAP ac, hAP ac lite, RB750Gr3, RB750Gr2 and many others.

You are advised to start using this guide on a brand new router with factory default configuration, as your existing setup may conflict with new settings.

Plug the Ethernet cable from UniFi BTU/modem to port number 1 of the router.

Plug the Ethernet cable from your computer to port number 2 of the router.

Wait for about 10 seconds to have the IP address assigned to your computer.

Open your favorite browser and go to http://192.168.88.1, you will come to a page where MikroTik WebFig is located.

Click on “Interfaces” on the left side menu.

Click on “VLAN” on top.

Click on “Add New” to add a new VLAN.

Change the values in the boxes (Name, VLAN ID, Interface) as shown in the screenshot below.

Click “OK” on top to complete.

Now you have the VLAN on the list.

Click on “PPP” on the left side menu.

Click on “Add New” to reveal a drop down list.

Select “PPPoE Client” from the list.

Change the values as shown below.

Click on the arrow as shown to reveal the options.

Select “vlan500” from the drop down list.

Fill in your UniFi account username and password respectively, as shown below.

That’s all the settings in this page, click “OK” on top to complete.

Click on “IP” on left side menu to reveal a sub-menu.

Click on “Firewall” on the sub-menu.

Click on “NAT” on the top menu.

Click on the item on the list.

Select “unifi” from the drop down list of “Out. Interface”, as shown below.

Click on “OK” to complete.

Click on “DNS” on the left side menu.

Click on the arrow as shown to reveal an input field.

Repeat it to create 4 total field.

Change the values in the fields as shown below.

Click on “Apply” to complete.

Now you should able to connect to the Internet with your computer!

(Updated on 25th Sept 2015)
The steps from here onwards are not necessary for the Internet to work but good to secure your router from any external threats such as DNS amplification.

Click on “Firewall” of the sub-menu of “IP”.

Click on this rule as pointed by the arrow.

Select “unifi” from the drop down list of “In. Interface”, as shown below.

Your settings should be the same as shown below. Then you can click on “OK” to complete.

Click on another rule as pointed by the arrow.

Do the same by selecting “unifi” from the drop down list of “In. Interface”, as shown below.

Your settings should be the same as shown below. Then you can click on “OK” to complete.

Source & credit taken from Cloudstore 🙂