Community discussions

MikroTik App
 
Aro
just joined
Topic Author
Posts: 1
Joined: Fri Aug 14, 2020 5:24 pm

Having Trouble with Port Forwarding

Fri Aug 14, 2020 5:32 pm

Hello,

I have a MikroTIk router running RouterOS6 and I am trying to do a simple port forwarding, but keep failing.

I have an application that runs on port 7777. I would like any communication to my external IP on port 7777 to be forwarded back to this system located on 192.168.88.247.

I added a forwarding rule with
/ip firewall nat add action=dst-nat chain=dstnat dst-port=7777 protocol=tcp to-addresses=192.168.88.247 to-ports=7777 
Whenever I try to connect to my external ip (let's call it 1.2.3.4), I see the forwarding rule on my RouterOS WebFig page go up by a single packet. So I am assuming that the packet is going to my IP, my router is receiving it, and it is sending it to this forwarding rule... and then... nothing.

The server never responds and a connection is never established.

The port is also opened by using UFW.
sudo ufw allow in 7777
I have no problems connecting to this server from within my local network.

Any nudge in the right direction would be helpful. Thank you for your time.
 
User avatar
nickshore
Long time Member
Long time Member
Posts: 524
Joined: Thu Mar 03, 2005 4:14 pm
Location: Suffolk, UK.
Contact:

Re: Having Trouble with Port Forwarding

Fri Aug 14, 2020 5:40 pm

If you are not changing the port then you don't need to specify to-ports.

Have you added a firewall rule in the forward chain to allow traffic from outside to get to the internal IP on that port ?
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22205
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Having Trouble with Port Forwarding

Fri Aug 14, 2020 7:25 pm

Without seeing your config, its a guessing game.
/export hide-sensitive file=anynameyouwish

You will note that Nick is missing the laypersons certification MTUNA, and thus may talk way above your head. ;-)
Those with official certifications, don't get the benefit of the MTUNA commandments (rules of thumb - Thou Shalt Not Guess!! ;-) )