Community discussions

MikroTik App
 
BlackrazorNZ
just joined
Topic Author
Posts: 11
Joined: Sat Jan 17, 2015 10:53 pm

Can't get Port Forwarding of 1812 and 16384 to work

Mon Jul 23, 2018 11:40 pm

Hi there,

I have a smoker controller for my BBQ that is WiFi enabled and is supposed to be accessible from both the WiFi network it is on as well as remotely.

Both the controller, and the app on my phone that allows you to monitor and set parameters, work flawlessly when my phone is connected to the local WiFi network that the controller is hosted on.

However, as soon as I leave that WiFi network, I can no longer connect. It leads me to suspect that it is a problem with the port forwarding / port access when outside the local network.

The controller uses ports 1812 and 16384 for access, and has been assigned a static local IP on 192.168.1.124

Below is my firewall config :

Code: Select all

# jul/24/2018 08:25:32 by RouterOS 6.42.6
# software id = 14U4-DILV
#
# model = CRS109-8G-1S-2HnD

/ip firewall filter
add action=drop chain=input comment="default configuration" protocol=icmp
add action=accept chain=input comment="default configuration" \
connection-state=established,related
add action=drop chain=input comment="default configuration" in-interface=\
ether1-gateway
add action=fasttrack-connection chain=forward comment="default configuration" \
connection-state=established,related
add action=accept chain=forward comment="default configuration" \
connection-state=established,related
add action=drop chain=forward comment="default configuration" \
connection-state=invalid
add action=drop chain=forward comment="default configuration" \
connection-nat-state=!dstnat connection-state=new in-interface=\
ether1-gateway
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
out-interface=pppoe-out1
add action=redirect chain=dstnat dst-port=53 protocol=udp
add action=redirect chain=dstnat dst-port=53 protocol=tcp
add action=dst-nat chain=dstnat dst-port=1812 in-interface=ether1-gateway \
protocol=udp to-addresses=192.168.1.124 to-ports=1812
add action=dst-nat chain=dstnat dst-port=16384 in-interface=ether1-gateway \
protocol=udp to-addresses=192.168.1.124 to-ports=16384
/ip firewall service-port
set ftp ports=1021

I've tried adding a port forward, and setting the protocol to both TCP and UDP - neither work, and an external port check of the ports shows no response or rejected whereas other common ports e.g. 80 for HTTP work fine.

Any suggestions on how to get these ports working correctly for this smoker controller?

Thanks for any help offered.

Daniel.
 
Van9018
Long time Member
Long time Member
Posts: 558
Joined: Mon Jun 16, 2014 6:26 pm
Location: Canada - Abbotsford

Re: Can't get Port Forwarding of 1812 and 16384 to work

Tue Jul 24, 2018 10:37 pm

Try using Tools > Torch in Winbox. Then try and connect remotely. You'll be able to see if packets are being received by the router, and forwarded to the smoker. And that the smoker replies correctly.

No gateway in the smoker can cause this. Or firewall rules in the smoker. Torch is a good place to start.
 
BlackrazorNZ
just joined
Topic Author
Posts: 11
Joined: Sat Jan 17, 2015 10:53 pm

Re: Can't get Port Forwarding of 1812 and 16384 to work

Wed Jul 25, 2018 6:44 am

Thanks for the suggestion, I'll give it a shot :)
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 2880
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Can't get Port Forwarding of 1812 and 16384 to work

Wed Jul 25, 2018 10:16 am

add action=dst-nat chain=dstnat dst-port=1812 in-interface=ether1-gateway protocol=udp to-addresses=192.168.1.124 to-ports=1812
add action=dst-nat chain=dstnat dst-port=16384 in-interface=ether1-gateway protocol=udp to-addresses=192.168.1.124 to-ports=16384
I see that you have PPoE interface in use. Does traffic goes in via this interface or via ether1-gateway?
Which interface should be defined in rules?

Who is online

Users browsing this forum: Amaan, FurfangosFrigyes, Laxity, shahzaddj1 and 164 guests