Sistemas‎ > ‎Redes‎ > ‎Mikrotik‎ > ‎

mikrotik nat redirect to local from local


You can see that Magle Rule marks connection (int_to_444)which are addressed from local subnet to and last of Nat Rule is masquerade this connection-mark

Comandos mikrotik

[admin@MikroTik] > ip address export
/ip address
add address= disabled=no interface=ether1-gateway network=
add address= disabled=no interface=ether2-master-local network=

[admin@MikroTik] > ip firewall mangle export
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no dst-address= dst-port=444 new-connection-mark=int_to_444 passthrough=no protocol=tcp src-address=

[admin@MikroTik] > ip firewall nat export
/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-address= dst-port=444 protocol=tcp to-addresses= to-ports=80
add action=masquerade chain=srcnat disabled=no out-interface=ether1-gateway
add action=masquerade chain=srcnat connection-mark=int_to_444 disabled=no