
How to Port Forward ports when using dynamic IP with Mikrotik RouterBoard.
What is Port Forwarding ?
In computer networking, port forwarding or port mapping is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are traversing a network gateway, such as a router or firewall. This technique is most commonly used to make services on a host residing on a protected or masqueraded (internal) network available to hosts on the opposite side of the gateway (external network), by remapping the destination IP address and port number of the communication to an internal host
Port Forward in Mikrotik Router
Down and dirty version. The command line version is below the Winbox instructions. Let’s say you have a DVR that has a static IP of 192.168.1.200, and you need to forward port 3999.
Assuming you have Dynamic IP, there is another way for static IPs or subnets.
In Winbox
1. Go to IP -> Firewall -> NAT (Image 1).
2. Click the “+” to add a new NAT rule. Modify the “Chain” to “dstnat”, “Protocol” to “tcp”, and “Dst. Port” to “3999”. Set the “In. Interface” to your WAN port. (Note: You are telling the router that any traffic coming IN from the Internet on port 3999 should follow this rule. If you forget this step, the router will grab ANY traffic on port 3999 and send it to the IP you specify in the next step) (Image 2).
3. Click the “Action” tab, change the “Action” value to “dst-nat”, the “To Addresses” to “192.168.1.200” and “To Ports” to “3999” (Image 3).
Terminal Version
Type the following value into a Terminal window to enter this port forwarding rule.
/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-port=3999 in-interface=ether1-gateway protocol=tcp to-addresses=192.168.1.200 to-ports=3999
Greetings,
If this help sheet on MikroTik Port Forwarding works u will be the first that got it right!!!
Thank You in Advance
Rob
hi, can you please make the tutorial for dynamic ip too? thanks
It doesn’t change anything. If you get internet through ether1 port, you should select ether1 like the example. If you get internet using for example a PPPoE connection you just choose the PPPoE interface in the In. Interface.