Skip to content

Instantly share code, notes, and snippets.

@guiltry
Created October 28, 2016 09:00
Show Gist options
  • Save guiltry/1fce0148fa2453bf1dc1504d63dc7dba to your computer and use it in GitHub Desktop.
Save guiltry/1fce0148fa2453bf1dc1504d63dc7dba to your computer and use it in GitHub Desktop.
Mikrotik Hairpin NAT
Flags: X - disabled, I - invalid, D - dynamic
0 ;;; defconf: masquerade
chain=srcnat action=masquerade out-interface=ether1-internet log=no log-prefix=""
1 ;;; hairpin nat
chain=srcnat action=masquerade src-address-list=local dst-address-list=local out-interface=ether2-master log=no log-prefix=""
2 chain=dstnat action=dst-nat to-addresses=192.168.88.11 to-ports=8765 protocol=tcp dst-address=!192.168.88.1 dst-address-type=local dst-port=8765 log=no log-prefix=""
3 XI chain=dstnat action=dst-nat to-addresses=192.168.88.51 to-ports=3000 protocol=tcp dst-address=!192.168.88.1 dst-port=30000 log=no log-prefix=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment