Senin, 18 Maret 2013

Port Forwading Mikrotik

Down and dirty version. The command line version is below the Winbox instructions.

Let’s say you have a DVR that has a static IP of 192.192.192.192 and you need to forward port 9999
So that a customer’s iPhone app can connect to it remotely.

In Winbox:

Go to IP / Firewall / NAT



Click the + to add a new NAT rule. Change chain todstnat, change Protocol to TCP, and change Dst. Port to 9999.
Set the “In. Interface” to your WAN port.

(You are telling the router that any traffic coming IN from the internet on port 9999 should follow this rule. If you forget this step, the router will grab ANY traffic on port 9999 and send it to the IP you specify in the next step)
Dst. Address is IP Public Internet = 202.202.202.202.






















Click over to the Action tab and make change it to “dst-nat”. Change To Addresses Local: to 192.192.192.192 and To Ports: to 9999.



















That’s it!

Terminal version:

This is all you would have to type into a Terminal window to enter this port forwarding rule.

/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no
add action=dst-nat chain=dstnat comment="portforwarding 9999" disabled=no dst-address=202.202.202.202 dst-port=9999 protocol=tcp \
    to-addresses=192.192.192.192 to-ports=9999




Regards
Merah Putih Segoroasat
Thanks

Tidak ada komentar :

Posting Komentar