Results 1 to 2 of 2

Thread: Tomato: redirect IP1 to IP2

  1. #1
    Join Date
    Feb 2009
    Location
    Slovenija
    Beans
    Hidden!

    Tomato: redirect IP1 to IP2

    Hello,

    I would like to setup my WRT54GL that has Tomato installed so it could redirect IP1 requests to IP2. Both IP1 and IP2 are external IPs. There is currently no way to set this redirect on the problematic machine, so I would force this with my router.

    Thanks in advance for any working redirecting example script!
    Last edited by R33D3M33R; March 11th, 2013 at 05:18 PM.

  2. #2
    Join Date
    Feb 2009
    Location
    Slovenija
    Beans
    Hidden!

    Re: Tomato: redirect IP1 to IP2

    I have tried to add this to scripts/Firewall:

    Code:
    iptables -t nat -A PREROUTING -d IP1 -j DNAT --to-destination IP2
    iptables -t nat -A POSTROUTING -j MASQUERADE
    But it doesn't work at all. Since IP1 is offline, a ping to IP1 should work only if this rule is working, but it there is no response from the server. What could I be doing wrong?

    /edit: it actually does work, but you have to reboot the router, not just save the command.
    Last edited by R33D3M33R; March 11th, 2013 at 05:18 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •