Community discussions

MikroTik App
 
Natted
just joined
Topic Author
Posts: 10
Joined: Wed Jan 15, 2014 10:32 pm

DSTNAT between two WAN

Tue Nov 25, 2014 4:15 pm

Hi all,
I have three WAN and a lan.
192.168.2.3 WAN 1 (conn mark wan1)
172.16.10.1 WAN 2 (conn mark wan2)
10.1.0.1 WAN 3 (conn mark wan3)
10.0.0.1 LAN
in PCC balancing mode.

I'd like to DSTNAT the port 8070 entering in WAN 1 and redirect it to an ip address on WAN3
example:
outside====> 192.168.2.3:8070(router) =>10.1.0.2:80
but when i try to connect to 192.168.2.3:8070 the connections hangs on "syn sent" but nothing else happens.

I have in ip firewall nat
chain=dstnat action=dst-nat to-addresses=10.1.0.2 to-ports=80 protocol=tcp in-interface=wan1 dst-port=8087 log=yes log-prefix="addr"
chain=srcnat action=masquerade out-interface=wan1 log=no log-prefix=""
chain=srcnat action=masquerade out-interface=wan2 log=no log-prefix=""
chain=srcnat action=masquerade out-interface=wan3 log=no log-prefix=""
in mangle the same configuration from PCC load balancing example.
When i try to connect to 192.168.2.3:8087(from other WAN ip) i see in connection tracking the inbound connection stucked in "syn received" and nothing happens. The connection is marked as WAN1. I also tried to disable the masquerade out WAN3 but nothing's changed.


What's wrong?


Image
 
technicarl
just joined
Posts: 13
Joined: Wed Nov 26, 2014 7:07 am

Re: DSTNAT between two WAN

Wed Nov 26, 2014 7:52 am

Are you not able to change the destination port to 8087 as well?
Otherwise you would need to reverse the port translation for acknowledgment.
 
technicarl
just joined
Posts: 13
Joined: Wed Nov 26, 2014 7:07 am

Re: DSTNAT between two WAN

Wed Nov 26, 2014 7:57 am

I may be wrong about the reversing of the translation but it would be neater to change the port number. Otherwise you may need to establish static routes for those IP's. Hope that helps.