Force OPENVPN client out on a different IP

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
robathome
OpenVpn Newbie
Posts: 7
Joined: Fri Dec 18, 2020 12:11 pm

Force OPENVPN client out on a different IP

Post by robathome » Tue Aug 03, 2021 10:29 am

Hi all,

If this has been answered elsewhere please point me to it - I don't use OpenVPN enough to be familiar with all the options and I have tried the documentation.

I've just given a Windows machine (which has OpenVPN client running and working OK back to a pfsense firewall) a failover IP in the advanced IP settings. This machine is directly on the internet - no NAT - so it now has 2 external IPs and I can ping both. Let's say the original IP is 5.x.x.x and the failover is 130.x.x.x.

I want to now force the VPN to go out on the 130.x.x.x address. How can I do that?

Here's my config.ovpn

Code: Select all

dev tun
persist-tun
persist-key
cipher AES-256-CBC
auth SHA256
tls-client
client
resolv-retry infinite
remote n.n.n.n 11195 udp
verify-x509-name "name" name
auth-user-pass auth.txt
pkcs12 pfSense-udp-11195-OVHbclickVPN.p12
tls-auth pfSense-udp-11195-OVHbclickVPN-tls.key 1
thanks

Post Reply