NAT loopback settings for two NAS in MikriTik

Hairpin NAT

Hairpin network address translation (NAT Loopback) is where the device on the LAN can access another machine on the LAN via the public IP address of the gateway router. 

Firsst Nas

/ip firewall nat add action=masquerade chain=srcnat dst-address=192.168.0.105 out-interface=ether2-LAN protocol=tcp src-address=192.168.0.0/24

Second Nas

/ip firewall nat
add action=masquerade chain=srcnat dst-address=192.168.0.104 out-interface=ether2-LAN protocol=tcp src-address=192.168.0.0/24

Endpoint-Independent NAT

Endpoint-independent NAT creates mapping in the source NAT and uses the same mapping for all subsequent packets with the same source IP and port. This mapping is created with the following rule:

/ip firewall nat
add action=endpoint-independent-nat chain=srcnat out-interface=ether1-WAN protocol=udp
/ip firewall nat
add action=endpoint-independent-nat chain=dstnat in-interface=ether1-WAN protocol=udp

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x