port forwarding

How make in MKROTIK 2.9.7 port PREROUTING

xx.xx.xx.xx - WAN interface
y.y.y.19/32 - pc in local network

i need

xx.xx.xx.xx port 1402 to y.y.y.20 port 1402
y.y.y.19 port 1402 to xx.xx.xx.xx port 1402

i have rule
chain=dstnat dst-address=xx.xx.xx.xx protocol=tcp dst-port=1402
action=dst-nat to-addresses=192.168.201.19 to-ports=1402

chain=src-nat src-address=192.168.201.19 protocol=tcp src-port=1402
action=src-nat to-addresses=xx.xx.xx.xx to-ports=1402

chain=srcnat out-interface=PUBLIC2 action=src-nat
to-addresses=xx.xx.xx.xx to-ports=0-65535 it’s rulle for all (masq)

this rule not working… :cry: :cry:

i have rule
chain=dstnat dst-address=xx.xx.xx.xx protocol=tcp dst-port=1402
action=dst-nat to-addresses=192.168.201.19 to-ports=1402

Good this is the port forward rule you need to send all 1402 traffic to .19 inside of nat firewall.

chain=src-nat src-address=192.168.201.19 protocol=tcp src-port=1402
action=src-nat to-addresses=xx.xx.xx.xx to-ports=1402

don’t need this rule. remove it.

chain=srcnat out-interface=PUBLIC2 action=src-nat
to-addresses=xx.xx.xx.xx to-ports=0-65535 it’s rulle for all (masq)

remove this rule and use the following command

 [admin@mikrotik] > ip firewall nat add chain=srcnat out-interface=PUBLIC2 action=masquerade

Dan