Sabtu, 09 Mei 2015

Port forwarding on mikrotik


Source : http://portforward.com/help/portforwarding.htm


What is Port Forwarding? 
Also called "port mapping," port forwarding is directing traffic from the outside world to the appropriate server inside a local TCP/IP network. Internet services are identified by a standard port number; for example, Web traffic uses port number 80. (source : www.pcmag.com)

Mikrotik router can do port forwarding with just a few steps, but the conditions ip public must be on mikrotik router, although not an absolute requirement. We can also do port forwarding on modem adsl when mikrotik router behind. it will be a complicated configuration.

So, I suggest you to setting ip public in mikrotik router first. On next article i'll explain how to do this.

Here is step by step how to configuration port forwarding on mikrotik router :

  • As usual, first connect to your mikrotik router, you can do with winbox or remote shell (like : ssh, telnet)
  • Afterthat, open firewall by clicking IP > Firewall from the left menu
  • Then, click plus sign (+) like in the picture below to create rule port forwarad 
  • The next step, select chain : dstnat, fill in the Dst. Address to your ip public mikrotik router, select Protocol : 6 (tcp), and Dst. Port : 80 (you can change to port what you want) 
  • Last, on the tab Action, select Action : dstnat, then fill to the ip address and port to your local computer, To Addresses : 192.168.1.1, To Ports : 80 
  • Click OK to save your configuration
We can create this rule from command line, just by typing this on terminal :
 /ip firewall nat add chain=dstnat dst-address=64.x.x.x protocol=tcp dst-port=80 action=dst-nat to-addresses=192.168.1.1 to-ports=80  
To view rule, typing this on terminal :
 /ip firewall nat print  
 Flags: X - disabled, I - invalid, D - dynamic  
  0  chain=dstnat action=dst-nat to-addresses=192.168.1.1 to-ports=80 protocol=tcp dst-address=64.x.x.x  
    dst-port=80 log=no log-prefix=""  
Now, you can test from outside Network to make sure this configuration success.
Ok, hopefully this will help.


1 komentar:

Ads Inside Post