Mikrotik Port Forwarding helps you access the devices that are behind a router from the Internet. With the Mikrotik Port Mapping configuration, you’ll be able to access the computers, devices, servers, or certain services that are behind a local Router / Network from the Internet / Wan or Public Network.
Also Read: Mikrotik Load Balancing
Related: Mikrotik RB5009
Table of Contents
- Port Forwarding in Mikrotik
- Set up Port Forwarding on Mikrotik Router
- Mikrotik Port Forwarding Script
Port Forwarding in Mikrotik
Mikrotik Port Forwarding or Port Mapping is a method of forwarding a network port from one network node to another. With Port Forwarding an External user can access a port on a private IP Address in a LAN from outside the local network using a NAT on a Router.
For Example, If you have a web server hosted on your local server and you want to access that webserver from an external Network, ie WEB, then you will need to configure port forwarding in Mikrotik Router.
You will need to forward port 80 on your Mikrotik router and then you will be able to access the web server on your local network through the Internet. So port mapping is a method used to allow a computer to access a port on a private network’s computer.
Set up Port Forwarding on Mikrotik Router
You can set up port forwarding in MikroTik by the following method:
- Access the MikroTik router’s web interface or use Winbox software to log in.
- In the web interface or Winbox, go to the “IP” menu and select “Firewall.”
- Click on the “NAT” tab to set up a new Network Address Translation rule.
- Click on the “+” (plus) button to create a new NAT rule.
- In the “General” tab, set the “Chain” to “dstnat” (destination NAT).
- In the “Dst. Port” field, enter the external port number you want to forward. For example, if you want to forward port 80 for web traffic, enter “80.”
- In the “Protocol” field, select the appropriate protocol for the service you’re forwarding (TCP or UDP).
- In the “Action” tab, set “Action” to “dst-nat.”
- In the “To Addresses” field, enter the internal IP address of the device you want to forward traffic to.
- In the “To Ports” field, enter the internal port number of the device you want to forward traffic to.
- Optionally, you can add a description in the “Comment” field to help you remember what this rule does.
- Click “OK” to save the port forwarding rule.
Remember to save the configuration changes by clicking on “Apply” or “OK” in the main configuration window.
With these steps, incoming traffic to the specified external port on your MikroTik router will now be forwarded to the designated internal IP address and port of the device on your local network. This allows you to host services such as web servers, gaming servers, or remote access applications.
Mikrotik Port Forwarding Script
/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
With Mikrotik Port Forwarding Script you can easily configure Port Mapping in Mikrotik Routers. You will just need to edit the Port Forwarding Script and then you can paste the scripts into Mikrotik Terminal and then your Mikrotik Port Forwarding Will be configured with just a few clicks.
Hence you can configure Mikrotik Port Mapping as briefly described above along with the tutorial. Hope this Mikrotik Port Forwarding Tutorial was helpful.
Also, If You face any problems, please comment below, I would love to answer you.