Community discussions

MikroTik App
 
MaciekRyd
just joined
Topic Author
Posts: 3
Joined: Sat Oct 23, 2021 5:21 pm

Access from LAN to LAN resource with port redirection via public address

Wed May 04, 2022 7:04 pm

Hi,
This topic was discussed but I cannot configure access from LAN to another LAN resurce, with port redirected, via public address.
Example: I have a sever accessible from internet e.g. 85.89.169.20:123.
In the LAN it is 10.10.0.27. So, I defined NAT rule and it works perfect. From outside of LAN.
Question is how to configure RouterOS (and where) to get access e.g. from 10.10.0.20 to 85.89.169.20:123.

Thanks in advance!
M.
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Access from LAN to LAN resource with port redirection via public address

Wed May 04, 2022 7:45 pm

You want thing called hairpin NAT, see viewtopic.php?t=179343.

TL;DR:
/ip firewall nat
add chain=srcnat action=masquerade dst-address=10.10.0.0/?? src-address=10.10.0.0/??
where ?? is subnet mask you use.
 
MaciekRyd
just joined
Topic Author
Posts: 3
Joined: Sat Oct 23, 2021 5:21 pm

Re: Access from LAN to LAN resource with port redirection via public address

Wed May 04, 2022 10:35 pm

THANK YOU!!!
:D
Works like a charm. Is there a logical explanation for this?
Best,
MR
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: Access from LAN to LAN resource with port redirection via public address

Wed May 04, 2022 11:42 pm

Yep, check the link I posted.

Who is online

Users browsing this forum: Google [Bot] and 77 guests