Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

OpenVPN and failover ips?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

OpenVPN and failover ips?

xrzxrz Member
edited June 2016 in Help

I run OpenVPN with --multihome option, how to setup it the way i connect to failover ip (OVH failover to be clear) and show exit ip as i connect to failover ip? i managed to only show original ip of server not the failover one.

Comments

  • BasilBasil Member
    edited June 2016

    I think you'd need 1:1 NAT for this, You can use iptables for this.
    https://dd-wrt.com/wiki/index.php/One-to-one_NAT

    That guide should cover the rules that you'll need (It did for me)

    I think you'd need to do it on a per-client IP basis, as I'm not sure how you'd automatically modify the rules depending on the IP used to connect.

    iptables -t nat -I POSTROUTING -s [VPN CLIENT IP] -j SNAT --to-source [FAILOVER IP]

    Something like that

    Thanked by 1xrz
  • xrzxrz Member
    edited June 2016

    Thx much !!!

    Needed to add :

    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source [FAILOVER IP]

    and it works now:)

  • BasilBasil Member

    Nice! Glad I could help :)

Sign In or Register to comment.