Community discussions

MikroTik App
 
xchose
just joined
Topic Author
Posts: 5
Joined: Mon Nov 09, 2015 4:30 pm
Location: Czechia
Contact:

NAT to udp pls help

Wed Jun 22, 2016 1:29 pm

Hello, 

I would like to add simple NAT rulez to my new microtic. 
board-name: RB2011UiAS-2HnD
I had before simple TP link with this settings: https://postimg.org/image/tv3gg4ns1/

I would like to translate port 1059 on my public IP to to my local IP 192.168.0.70 port 59

/ip firewall nat add chain=dstnat dst-port=1059 action=dst-nat protocol=udp to-address=192.168.0.70 to-port=59
 
But seems not working. Probably do some mistake. Could you please help what to check and focus on?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4047
Joined: Wed May 11, 2011 6:08 pm

Re: NAT to udp pls help

Wed Jun 22, 2016 4:57 pm

This rule needs to be restricted to incoming traffic on the WAN interface
Go into the rule's configuration, and set in-interface=wan (whatever the name of the interface is which has your router's public IP address)

Then make sure that the firewall's filter table isn't blocking this traffic in the forward chain of rules.
either permit the traffic specifically by udp/port number (use the INSIDE port number, because the forward filter happens AFTER the dstnat has taken place), or else you can allow all NAT pinholes by a simple rule:
chain=forward
action=accept
connection-nat-state=dstnat

Make sure that this rule comes sooner in the chain than any rule which would drop the packets.