Tomato, OpenVPN and Policy Based Routing

Discussion in 'Tomato Firmware' started by jokerjoe, Jul 12, 2012.

  1. jokerjoe

    jokerjoe Serious Server Member

    Hi, I've got my router running TomatoUSB VPN, set up as an OpenVPN client. I can get it to route all traffic down the tunnel, but I'd like to route only traffic with certain destination IPs. I understand this is called policy-based routing.

    From what I've managed to find, I need something along the lines of

    ip route add default dev ppp0 table 100
    ip rule add to table 100
    iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
    Where do I put the script? Is that the right interface?

    Thanks for your help.
  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