So, story is this: I got into a this new crypto mining using LoraWAN protocol called Helium, I am sure that a few people on this forum is familiar with Helium.
You need to hook up this crypto mining device on the internet and forward specific TCP port 44158, and that part I did, and everthing is working fine, but device (Bobcat Miner 300) also have an SSH port 22 for SSH customer support and htttp port 80 for basic dashboard so You can see a device basic information.
I wanted to forward port 80 to device, so I can access it over the internet, and when I access device in local LAN everthing work fine, but when I try to access device’s web interface over http port 80 from internet, device see that my IP is not intenal IP inside LAN but IP from internet (outside), and manufacturer (I presume for seafety reasons) configured device that it redirect my browser from devices’s dashboard to manufacturer’s website (https://www.bobcatminer.com).
My question is: how I can do a port forwarding rule, so device to which I am forwarding port 80 can see me as I am accessing it from local network (might be a gateway IP) and not as public IP ?
Ideally you should use a VPN rather than forwarding tcp port 80 to the Miner from the WAN (because even if you restrict the access to a few permitted source adresses, the communication will travel across internet in plaintext form). If you insist to do it this unsafe way, you have to add a dst-nat rule just like the one used to forward the 44158, but you have to add also a src-nat rule and place it to a proper position in the srcnat chain:
chain=srcnat action=masquerade protocol=tcp dst-port=80 dst-address=ip.of.the.miner out-interface=lan-interface-name
So all connections to the Miner will be src-nated to Mikrotik’s own LAN address.
Thanks a lot, it works like a charm ! ![]()
For the security measures a plan to turn on the rule only when I need to access the device.
Again, huge thanks !