This article is written by Server Management Inc. IT systems administrator Timo Puistaja - 19.04.2017, Tartu, Estonia.
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.
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 192.168.0.10 for example.
Lets assume you want your server to be accesible for the whole world and you have static public IP from your ISP: 184.108.40.206
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) 220.127.116.11.
Now you need to somehow connect the Public IP(18.104.22.168) and your server (192.168.0.10). 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: 22.214.171.124; Protocol: 6 (tcp) or 17 (udp) depending on your needs; Dst. Port: 80
Action Tab: Action: dst-nat; To Addresses: 192.168.0.10; To Ports: 80
SAVEOR from terminal:
/ip firewall nat
add action=dst-nat chain=dstnat comment="Webserver HTTP" dst-address=126.96.36.199 dst-port=80 protocol=tcp to-addresses=192.168.0.10 to-ports=80