port mapping + snat?

Discussion in 'Tomato Firmware' started by rs232, Aug 17, 2012.

  1. rs232

    rs232 Network Guru Member

    I'm trying to do something a bit difficult (to me at least)

    I have two default gateways in my LAN (both tomato) and all the hosts use gw1 as default gateway apart from a specific one that uses gw2 instead. So:


    The problem is: I'd like to map an external port on gw1 to this host, but this will not work as the source IP comes from Internet and the host will respond sending packets to gw2.

    I was thinking... would it be possible to source nat (only) the port I'm forwarding from gw1 to host?
    This way I fool host to think that the source IP is actually gw1, and when the packet returns to gw1 this is de-natted and sent back to the real source IP.

    I hope I've explained myself.
  2. rs232

    rs232 Network Guru Member

    it wasn't that difficult actually:
    did it nicely!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice