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

mikrotik nat redirect to local from local

Fonte: http://stackoverflow.com/questions/20163669/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 1.1.1.1:444 and last of Nat Rule is masquerade this connection-mark

Comandos mikrotik

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

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

[admin@MikroTik] > ip firewall nat export
/ip firewall nat
add action=dst-nat chain=dstnat disabled=no dst-address=1.1.1.1 dst-port=444 protocol=tcp to-addresses=10.0.0.2 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

Comments