Enable port forwarding for the Mikrotik MIKROTIK RB

Mikrotik Port Forwarding from Winbox

Port Forwarding in MikroTik Router

Port Forwarding is the best way to access your servers from any location without compromising network security. Using Port forwarding you can access your FTP server, Game server, Web server, NVR, DVR those are running in the private network using your internet WAN IP with Mapping Port number to specific server IP address and port number. If you are using the MikroTik routerboard and want to forward port for your web server, FTP server, and any other that you wish to access from a WAN network then this user manual will give you a brief user guide to Port forwarding on Mikrotik from Winbox.

You need to login MikroTik RouterOS from Winbox to setup port forwarding for different servers and applications running on a private network but you want to access from public networks.

Network connection diagram to setup Port forwarding

To learn how to port forward in Mikrotik you need to understand the network diagram and configurations.

In this network diagram, the webserver and FTP server configured to a private IP address that is not accessible from the internet. With Port forwarding, we can access both the server from public internet access using Port Mapping NAT configurations.

MikroTik router  WAN IP Address – 103.79.170.225

Mikrotik LAN IP192.168.88.1/24

Web Server IP -192.168.88.100   Webserver Port– 80

FTP server IP – 192.168.88.200 webserver port– 21

mikrotik port forwarding example Network Diagram

Using port forwarding configuration we can access the server from WAN IP address with mapping port destination to specific IP address i.e web server, FTP server, ssh server.

Setup Port Forwarding for Web server

If you have a web server configured with private IP address class and you want to access it from the internet without using static IP to web server LAN IP then you need to forward webserver port.

Connect MikroTik Router to LAN port from Pc/Laptop and login with Winbox configuration utility.

Go to IP- Firewall

Go to the “NAT” tab and follow configuration as shown below image.

NAT (network address translation) under the NAT option you need to create a forwarding root assigning  source and destination address with port numbers.

Press the plus (+) button to create new NAT rules.

General

Chain- select dstnat

Dst. Address- 103.79.170.228 (WAN IP address of MikroTik Router configured in Internet Port)

Protocol– TCP

Dst Port– 80 (if you are using different port numbers you can use the same for your server).

how to configure mikrotik router step by step

Press the Appy button and go to the Action tab

Action – dst-nat

To Addresses: 192.168.88.100 (Web server Local IP address )

To Ports- 80

MikroTik Port Forwarding on Cloud router using Winbox

Press Apply and OK button

Access Mikrotik WAN IP address from different internet you will get Web server access because of port forwarding.

Port Forwarding for FTP server

FTP (file transfer protocol) server used to share files using client and server applications. You can also create Nat rules to access your FTP server from the internet using port forwarding.

In the diagram FTP Server, the local IP address is 192.168.88.200, and Port number 21

Go to IP – Firewall

NAT tab

Press the + Plus button and create new NAT rules.

Chain- select dstnat

Dst. Address- 103.79.170.228 (WAN IP address of MikroTik Router configured in Internet Port)

Protocol– tcp

Dst Port– 21 (you can forward any port number depending on your server type and assign port number)

Press Apply button and go to the Action tab

Action

Action – dst-nat

To Addresses: 192.168.88.200 (FTP server Local IP address )

To Ports- 21

Press Apply and OK button and configuration are done.

Now you can access your FTP server (http://103.79.170.228) from the internet using port forwarding methods.

 

Using port forwarding NAT rules you can also enable and disable SSH, Telenet access for your MikroTik router from the internet to manage and monitor your network from any locations. You can access your DVR, NVR, Gaming server, and any other server using forwarding rules in Microtik routers.

MikroTik Router Configuration Manual | Download

Related Post