Community discussions

MikroTik App
 
User avatar
tomasi
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Fri Oct 03, 2014 6:40 pm
Location: Brazil
Contact:

How to dst-nat to a host without gateway?

Mon Sep 27, 2021 6:13 pm

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
You do not have the required permissions to view the files attached to this post.
Last edited by tomasi on Tue Sep 28, 2021 5:30 pm, edited 1 time in total.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19101
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: How to dst-nat to a host without gateway

Mon Sep 27, 2021 6:18 pm

Well, funny you should ask.

check out this post from this thread......
viewtopic.php?f=13&t=178857#p882479
 
User avatar
tomasi
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 99
Joined: Fri Oct 03, 2014 6:40 pm
Location: Brazil
Contact:

Re: How to dst-nat to a host without gateway?

Thu Sep 30, 2021 4:56 pm

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
:D

Who is online

Users browsing this forum: Bing [Bot], cdblue, Google [Bot] and 41 guests