How to dst-nat to a host without gateway?

Hi,

Is it possible to configure dst-nat rule to access a remote device that doesn’t have a gateway configured?

The image has details about the intended scenario:
image_2021-09-27_111104.png
I would like to access 192.168.1.3 device (that is behind NAT of 192.168.1.1), but it doesn’t have a gateway (default route) configured
This way it can’t answer the device originating the request, but it’s able to communicate with 192.168.1.1 that’s in the same layer 2 domain

Thanks

Well, funny you should ask.

check out this post from this thread…
http://forum.mikrotik.com/t/hex-s-redirect-traffic-or-port-forwarding/152121/1

Thank you!

I checked the link you provided and it worked:

/ip firewall nat

add action=dst-nat chain=dstnat comment=".3 access" dst-address=200.N.N.1 dst-port=7000 \
    protocol=tcp to-addresses=192.168.1.3 to-ports=8080

add action=src-nat chain=srcnat comment=".3 access" dst-address=192.168.1.3 dst-port=8080 \
    protocol=tcp to-addresses=192.168.1.1

:smiley:

1 Like