Mikrotik and RouterOS FAQ

1. I want to host a *insert game here* server, how do I open necessary ports?

Opening necessary ports for an application on your computer is relatively easy assuming your Mikrotik router has default configuration, your internet comes from ethernet1 port, you know which ports to open and a LAN address of the computer the application is running on.

For the latter one go to the “Leases” tab in “IP > DHCP Server” and find your device using “Active Host Name” parameter.

Here we see a device name DESKTOP-HSK7HA2, which is typically used by a Windows OS where our application is currently running, take a note of our IP address here. Double click on it and press “Make Static” to make sure that IP address of our device doesn’t change after reboot and our necessary changes work. Click on OK.

Next we go to “NAT” tab in “IP > Firewall” and click on the blue plus to add a new rule.

For the current example we are going to open the necessary ports for a Minecraft Java server, which by default uses TCP port 25565. For that in the current window we go to “General” tab and change these settings:

Chain – a setting that determines in which direction our necessary application traffic goes. Choose “dstnat” – our traffic comes from the internet into our local network.

Protocol – determines our TCP/IP traffic protocol that the application traffic uses, choose “6 (tcp)”.

Dst. Port – our traffic destination port value, input 25565.

In. Interface – our interface which the traffic comes from in the first place, typically where our internet comes from. Choose “ether1” or any other relevant interface.

Now we go to our “Action” tab, which determines what the router is going to do with the traffic that we specified, change the following settings:

Action – choose “dst-nat” which tells that our traffic will go to a destination through NAT on our local network.

To Addresses – IP address of our device in the local network which we took a note of earlier, input that over here.

To Ports – port value which out application traffic uses – input 25565.

Press ok to save and apply all of our settings. Now the application has it’s necessary ports open.

2. I want to use different DNS server addresses for devices on my network. How do I do it?

You can change your DNS server addresses relatively easy any time If you have any issues with DNS servers that your ISP provides. One advantage that Mikrotik devices have in that they can cache your recently used DNS records to make subsequent connections to them faster.

First go to “IP > DHCP Client”, in the “DHCP Client” tab double click on the setting with the interface that you receive your internet traffic from, in the windows that appeared untick “Use Peer DNS” so that we wouldn’t use DNS servers that our ISP provides.

Now in “IP > DHCP Server” in the “Networks” tab double click on our current DHCP configuration and input your router (!) address in the “DNS Servers” field. Press OK.

And lastly in “IP > DNS” in the “Servers” field input DNS server addresses that you want to use, press ok.

If everything is done correctly you should see new records appearing when you press on the “Cache” button in the same window after pressing OK and rebooting the device.

3. How do you backup and restore your Mikrotik router configuration.

To do so we first open up a terminal by pressing on “New Terminal” button.

To save our current configuration in the current terminal window we type:

export file=”configuration name”.rsc

Following by pressing Enter. Here “Configuration name” must be replace with any name you like in latin characters. Our saved file will be located on the root of the devices in “Files” where you can save it to your computer by right clicking on it and choosing “Download”.

PLEASE NOTE that when you save your configuration, your router password doesn’t save for safety reasons, which you’ll have to set in “System > Password” upon restoring. Configuration file also remains undeleted if routers settings are reset to default.

To restore configuration that you recently saved to a file, in terminal windows type:

import file=”configuration name”.rsc

4. How do you update your device if your internet is down?

In case if your router doesn’t have access to the internet and you have the necessary .npk update file saved un your computer you can update your device by uploading that file to the root of the device in the “Files” menu, followed by a device reboot. Also don’t forget to update your device firmware in “System > RouterBOARD” to avoid any unnecessary bugs and problems while using it.