Page 1 of 1

Force OPENVPN client out on a different IP

Posted: Tue Aug 03, 2021 10:29 am
by robathome
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