Community discussions

MikroTik App
 
IntEx
just joined
Topic Author
Posts: 6
Joined: Sat Jul 07, 2012 2:49 pm

[SOLVED] DSTNAT with MikroTik source IP instead of remote

Sat Jul 07, 2012 3:27 pm

Hi to all!

Is there any way to "maquerade" source address of packet sent from MikroTik to host over a DSTNAT rule?

Now it works that remote client (IP 1.1.1.2) send request to port of MikroTik GW (IP 1.1.1.1) and MikroTik DSTNAT the request over its interface (with IP 192.168.1.1) to destination host with source address of remote client (IP 1.1.1.2) and destination host (192.168.1.2). But when the destination host does not have set the default gateway, the response is lost (destination 1.1.1.2 for 192.168.1.2 is unreachable).

All I need is to replace source address of packet sent by MikroTik to destination host by its own interface adress (instead of remote sender). This will enable the host repsond to remote sender thanks to its knowledge, where to send the response (from hostst 192.168.1.2 to MikroTiks 192.168.1.1).

Thank you,

Jan
Last edited by IntEx on Tue Jul 10, 2012 12:49 am, edited 1 time in total.
 
IntEx
just joined
Topic Author
Posts: 6
Joined: Sat Jul 07, 2012 2:49 pm

Re: DSTNAT with MikroTik source IP instead of remote

Tue Jul 10, 2012 12:48 am

I will respond myself :-)

After some studying packet flow scheme I have created rule in SRCNAT chain, where DST-ADDRESS condition was host's IP address on LAN and SRCNAT action where TO-ADDRESS condition was the address of MikroTik's interface which I wanted to pass out.

So, solved ;-)

Who is online

Users browsing this forum: Ahrefs [Bot], CoMMyz, uxertxo and 75 guests