MikroTik: How to Forward Ports on Your Router

A common question for home users is How to redirect the port to MikroTik device, for the games and programs to work correctly.

The easiest option is to enable UPnP for devices on your home network. Most programs and games have UPnP support, but in some (Torrent) it must be enabled in the settings.

Universal Plug and Play (UPnP) is a set of networking protocols that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices to seamlessly discover each other’s presence on the network and establish functional network services for data sharing, communications, and entertainment. UPnP is intended primarily for residential networks without enterprise-class devices.

Wikipedia

Content

  1. UPnP settings
  2. Firewall rules

Article in other languages:
?? – MikroTik: Cómo reenviar puertos en su enrutador
?? – MikroTik: Как перенаправить порт на роутере
?? – MikroTik: Comment redirection des ports sur votre routeur
?? – MikroTik: So leiten Sie Ports auf Ihrem Router weiter
?? – MikroTik: Hoe u poorten op uw router doorstuurt

Port Forwarding (MikroTik UPnP)

Enable UPnP support in MikroTik:

[IP] -> [UPnP] -> [UPnP Settings: Enabled, Show Dummy Rules]

In the UPnP settings window, specify the external and internal interfaces of the router.

After enabling UPnP and the Show Dummy Rules item in the Firewall window, you will see the automatic port forwarding rules.

How to forward port on your router using UPnP

Port forwarding (MikroTik Firewall)

An example is shown for the Torrent client:

  • Torrent port: 50237;
  • Torrent protocol: UDP;
  • Computer IP address: 192.168.2.9;
  • Incoming interface (Internet): beeline;
  • Internal interface (local network): bridge1-lan.

Create a Firewall rule manually:

[IP] -> [Firewall] -> [NAT] -> [+] -> [General: Chain=dstnat, Protocol=17(udp), Dst.Port=50237, In.Interface=beeline] -> [Action: Action=netmap, To Addresses=192.168.2.9, Port=50237]

Let’s create a Firewall rule via the terminal:

/ip firewall nat add chain=dstnat protocol=udp dst-port=50237 in-interface=beeline action=netmap to-addresses=192.168.2.9 to-ports=50237
How to forward port on your router  using Firewall rules

? How to set up port forwarding on a MikroTik router was discussed in this article. I hope now setting up port forwarding will not be difficult and programs and games will work as expected, use UPnP if possible. However, if you run into any problems while setting up, feel free to write in the comments. I will try to help.

The script is checked: hAP ac lite [RouterBOARD 952Ui-5ac2nD], RouterOS 6.47.8 (stable).

Leave a Comment