Windows 7 – OpenVPN – Use second network interface

openvpnwindows

is it possible to configure Windows 7 to connect to a OpenVPN Server using a different network interface.

My setup:
1. LAN -> public ip
2. LAN -> public ip
3. Tun -> private VPN

now i want that lan1 is used for normal surfing and lan2 is used for the tunnel.

Is this possible to configure?

Best Answer

The VPN gateway is routed just like everything else. All you need is to add a route pointing to the VPN gateway, leading out the preferred NIC.

route add <VPN gateway IP> mask 255.255.255.255 <default gateway IP> metric 1 if <interface number>

The <default gateway IP> needs to be the local default gateway for the NIC in question, the <interface number> you can get with route print. You can omit the if <interface number> when the default gateway isn't reachable from the other NIC.

Related Topic