notes/IT/Deployment docs/Configuring hairpin NAT on a Mikrotik router.md
2024-07-05 12:05:23 -06:00

14 lines
586 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Hairpin NAT enables a device on the LAN to access another device on the LAN via the public IP
https://help.mikrotik.com/docs/display/ROS/NAT#NAT-HairpinNAT
From the RouterOS CLI, enter NAT configuration mode:
```
/ip firewall nat
```
Configure NAT to forward any traffic from the LAN net that's directed at the WAN IP to forward that traffic back to the the server in question (You can only forward to a single IP):
```
```
I first tried `add` `action``=masquerade` `chain``=srcnat` `dst-address``=10.0.0.3` `out-interface``=LAN` `protocol``=tcp` `src-address``=10.0.0.0/24`|`