tech tips and recent news
2024-11-25 03:11:19 / Jee
I wrote this tutorial on how to do a simple port forwarding in Mikrotik Hex and Haplite.
Port forwarding is an essential feature of all routers and smart switches. This feature lets us expose a service running from another computer within our network and make it accessible anywhere.
Follow the following on how to do it.
The above figure shows the NAT rule window and you only need to modify the "Chain" field and select "dstnat". You need to select the proper protocol. Since I'm exposing a web service, I selected TCP.
The next important field is the Dst. Port or Distination Port. It means the port number that you want to open publicly. You need to use a different port number that is not common. On my case, I selected 8888 as no other service is using the port number.
Follow the next step to complete the port forwarding rule. Go to the "Action" tab.
The above figure is the content of the "Action" tab and this is very important to make the rule successful. You need to write the IP address of the machine that you want to expose a service. In my case, my webserver is running on port 80 and the local network address is 192.168.30.5. Change the "To Ports" according to the port number your local machine (server) is using. You need to write the IP address of the computer that you are exposing in the "To Addresses" field.
Click the Apply or OK button and test it write away.
How to test? Just simply use your routerboards ip and append the port (dst port) that you wrote.
Example:
My Haplite ip address is 192.168.50.21 (Assigned by my Hex). To access the service on my haplite network all I need to do is access it using the following
192.168.50.21:8888
The above IP will open the service on my 192.168.30.5 machine that is connected to my haplite that is connected to my hex board.
If you still don't understand, drop a comment and I will try to help you if I have time. Thanks for reading. Please subscribe and share. Thank you.
Template by: Textbox IT
Leave a Reply