Openvpn – Allow VMWare client to connect only via VPN

openvpnvmware-esx

I have a VMWare (currently using Workstation on Vista, but thinking about switching to ESX) client with Windows XP. I've installed OpenVPN in the client and it connects to the corporate VPN server. I want to make sure that all traffic from the Windows XP machine goes trough this VPN tunnel, but I can't change any settings on the corporate VPN server.

Is it possible to restrict the internet connectivity of the Windows XP client in such a way that it can only send packets to the IP of the corporate VPN server? In that way it'd be impossible for packets to bypass the tunnel. I've looked at NAT configurations but couldn't see how I could make this setup.

Best Answer

I do not have a windows box handy, but in advanced TCP/IP settings there is a checkbox that says "Use Default Gateway on Remote Network". This will do what you need.

Double-click My Computer, and then click the Network and Dial-up Connections link. Right-click the VPN connection that you want to change, and then click Properties. Click the Networking tab, click Internet Protocol (TCP/IP) in the Components checked are used by this connection list, and then click Properties. Click Advanced, and then click the Use default gateway on remote network

Related Topic