Computer Networking

MikroTik RouterOS - Port Forwarding


This article is written by Server Management Inc. IT systems administrator Timo Puistaja - 19.04.2017, Tartu, Estonia.

Need help configuring your device? Contact us

Port forwarding is something IT systems administrators do almost every day. Its very common procedure everywhere, mose of the new PC gamers and IT students face the problem sooner or later. Usually they read a tutorial about "How to setup your own dedicated CS:GO or webserver?!" and one part of it is port forwarding to your server.


  1. Recommended to have Static Public IP from your ISP. When you have Dynamic IP from ISP that means it can change any time and your port forward rule wont work after the change of IP.
  2. Firewall rule to allow traffic from the port you are going to forward - my article about firewall: MikroTik RouterOS - Best practice firewall.
  3. You know how PORTS in computer networking work. Or if you dont know port forwarding itself gives you some clue how it works.

How Port Forwarding works and how to do it in MikroTik Router OS

To make everything clear im going to make up a simple real life situation. Your old gaming PC is standing in the corner and you want to make something out of it - webserver or CS:GO server or whatever server. You have installed the software and done the setup, everything works in your LAN (Local Area Network). The server local IP is for example.

Lets assume you want your server to be accesible for the whole world and you have static public IP from your ISP:

This means your router is accesible from the whole world from address (it´s not if you have done some Geoblocking or whitelisting in MikroTik)

Now you need to somehow connect the Public IP( and your server ( This is where port forwarding comes in.

You can connect you public IP and server port-by-port doing it in MikroTik NAT menu.

To visualise how Port Forwarding works I made a little picture:

So heres how you do it:

Just navigate to the menu IP - Firewall - NAT - ADD

General Tab: Chain: dstnat: Dst. Address:; Protocol: 6 (tcp) or 17 (udp) depending on your needs; Dst. Port: 80

Action Tab: Action: dst-nat; To Addresses:; To Ports: 80


OR from terminal:

/ip firewall nat

add action=dst-nat chain=dstnat comment="Webserver HTTP" dst-address= dst-port=80 protocol=tcp to-addresses= to-ports=80

Need help configuring your device? Contact us

Was dit artikel nuttig?
0 0 (Meld u aan om te kunnen beoordelen)
PDF downloaden

Wachtwoord opnieuw instellen

Typ hieronder uw e-mailadres. U ontvangt dan een nieuw wachtwoord per e-mail.