How to Set Up Port Forwarding on MikroTik with WinBox
Forward a port on a MikroTik router to a device in your network with a dst-nat rule in WinBox or one terminal line, then test it and limit who may use it.
3 min readBy Shailabh
Reviewed by the AmazingRDP technical team

Tired of port forwarding at home? A VPS has a public IP address of its own, with nothing to forward. See Windows VPS from $8.99
Devices behind a router share one public IP address and cannot be reached from the internet. Port forwarding makes an exception: connections that arrive at the router on a chosen port are passed to one device inside. On a MikroTik router this is a "dst-nat" rule. WinBox is MikroTik's free configuration program; new to the brand? See what MikroTik is.
Before you start
- The device's address must not change. In WinBox, open IP, DHCP Server, Leases, right-click the device and choose Make Static.
- Know the port and protocol the service uses, for example TCP 443 for a web server.
- Know your internet interface. Under Interfaces, it is the one connected to your provider, often
ether1or apppoe-outentry. Default configurations put it in an interface list called WAN.
Create the rule in WinBox
- Open IP, Firewall, and the NAT tab. Click the blue +.
- On the General tab set:
- Chain:
dstnat - Protocol:
tcp(orudp) - Dst. Port: the port people connect to from outside, for example
8080 - In. Interface List:
WAN(or In. Interface: your internet interface)
- Chain:
- On the Action tab set:
- Action:
dst-nat - To Addresses: the device, for example
192.168.88.10 - To Ports: the port on the device, for example
80
- Action:
- Add a comment such as "web server" and click OK.
The same in one line
In New Terminal:
/ip firewall nat add chain=dstnat in-interface-list=WAN protocol=tcp dst-port=8080 action=dst-nat to-addresses=192.168.88.10 to-ports=80 comment="web server"
The outside port and the inside port may differ, as here: the world connects to 8080, the device answers on 80.
The filter rules
MikroTik's default firewall already lets forwarded connections through: its rule drops traffic from the internet unless it was dst-nat'ed. If you wrote your own firewall, add an accept rule in the forward chain for the device and port, above your drop rule.
Test from outside
Testing from inside your own network gives a false "it does not work" (see hairpin, below). Use a phone on mobile data, or ask someone elsewhere, and connect to your public IP address and the outside port. In WinBox, the rule's Packets counter on the NAT tab rises when connections arrive. That counter is the best fault-finder: if it stays at zero, nothing reaches the router.
Limit who may use it
An open port is found by scanners within hours. If only known addresses need it, say so in the rule: on the General tab, fill Src. Address, or in the terminal add src-address=203.0.113.10. For several addresses, use an address list and Src. Address List on the Advanced tab.
Never forward Remote Desktop (3389), database ports or a device's admin page to the whole internet. Limit them to your addresses, or better, reach them through a VPN into the router.
When it does not work
- The counter stays at zero. Your provider does not give you a public address of your own (carrier-grade NAT). Compare IP, Addresses on the internet interface with what a "what is my IP" site shows; if they differ, ask the provider for a public address. Or a modem in front of the MikroTik is itself a router and must forward the port too.
- The counter rises, but no connection. The device's own firewall blocks it, the service is not running, or the device's gateway is not the MikroTik.
- It works from outside but not from inside with the public address. That needs a "hairpin" rule:
/ip firewall nat add chain=srcnat src-address=192.168.88.0/24 dst-address=192.168.88.10 protocol=tcp dst-port=80 out-interface-list=LAN action=masquerade comment="hairpin"
- Rule order. NAT rules are read from the top; a broader rule above yours can catch the traffic first. Drag yours up.
Or skip forwarding altogether
If the service is for the public, a server with its own public address is simpler and keeps strangers out of your home network. See our Windows VPS and Linux VPS plans. Related guides: block and unblock websites on MikroTik, enable a port through PowerShell and check open ports on Ubuntu.
Questions
How do I forward a port on MikroTik?
Add a NAT rule with chain dstnat, the protocol and outside port, your internet interface, and the action dst-nat with the inside address and port.
Why does my port forward work from outside but not from inside?
Reaching your own public address from inside needs an extra "hairpin" NAT rule.
Why is the packet counter of my rule zero?
Connections do not reach the router: the provider uses carrier-grade NAT, or a modem in front must forward the port as well.
Is port forwarding safe?
It exposes that service to the internet. Limit the rule to known source addresses, or use a VPN.