Hey. First of all: do you really have an application that listening that port? Because port forwarding via nat doesn’t mean port will be opened from Internet just out of nowhere.
And second - you need to assign destination address, explicitly public one or assign an input interface which has that address, or both with specific address if that interface has a subnet less than /30(<30).
Yes I tried with an application and also with nc -l. My understanding is that if there’s no application, the client would get connection refused, or a timeout if the rule doesn’t work.
I can’t assign an IP since it’s dynamic but I’ll try now with an interface.
Thanks for the replies but it doesn’t work. I installed nginx on my computer, the welcome page is available at http://localhost, and http://192.168.88.251/ . I entered this rule:
/ip firewall nat add chain=dstnat dst-address=“your-public-IP” dst-port=55555 action=dst-nat protocol=tcp to-address=192.168.88.251 to-port=80
Then I enter my public-IP:55555 in my browser, and I get a connection timeout, in the meanwhile in the router NAT page I see the packet count increase for the rule I just created! What now? I tried so far with 2 servers on different ports, and netcat.
There are two steps. First is dstnat, to change destination to internal address and port. That’s probably already ok, if counter increases. Second is firewall filter, which can stop forwarded packets, so you must make sure it doesn’t. This rule, strategically placed (i.e. before anything that could block those packets), will do it:
If not, look closer what happens. You can use Tools->Torch on incoming and outgoing interface and check if packets are arriving and passing through router correctly. Or you can add logging rules to prerouting and postrouting, and you’ll see where it’s going wrong.