Acsess VMware client on host computer

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
mkysoft
OpenVpn Newbie
Posts: 5
Joined: Thu Sep 22, 2011 12:43 am

Acsess VMware client on host computer

Post by mkysoft » Thu Sep 22, 2011 12:51 am

I have a server running Windows 2008 R2. And I am running Windows 2003 in VMware on it. I installed OpenVPN on Windows 2008. I can connect with TUN and acsess server. I want to acsess VMware guest (Windows 2003) system over VPN network. Problem is:
VMware cannot use bridged network as adapter. Also VMware visual network adapter cannor bridged with TAP device, because VMware block this operatation (give this info http://vmware.com/info?id=68).

I don't want to install in guest (2003) because of performance.

Is there another option?

Thanks.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Acsess VMware client on host computer

Post by Mimiko » Thu Sep 22, 2011 6:41 am

If form Win2008 server you can ping the VMware host and use network services, just configure routing on Win2008 as if VMware host is another computer on lan.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Acsess VMware client on host computer

Post by janjust » Thu Sep 22, 2011 8:27 am

Mimiko is right.

I actually use a similar setup myself: my laptop runs Linux, vmware player and openvpn; I run Windows XP as a VM. When my openvpn is set up I can connect remotely to the Windows XP VM using either windows file sharing or using RDP .

It's just a matter of routing :geek:

mkysoft
OpenVpn Newbie
Posts: 5
Joined: Thu Sep 22, 2011 12:43 am

Re: Acsess VMware client on host computer

Post by mkysoft » Thu Sep 22, 2011 12:13 pm

I can't route on win2008. My configuration like this:

I am using tun connection.

Win2008 (Host)
-----------------
TAP adapter: 10.5.0.0/255.255.255.0
Wnet8 adapter (NAT-share host ip adress with host): 192.168.40.1 (DHCP enabled 192.168.40.128 to 255)
routes:
10.5.0.0 255.255.255.0 to 10.5.0.1
192.168.40.0 255.255.255.0 to 192.168.40.1

Win2003 (guest)
----------------
Wnet8 adapter: 192.168.40.137

XP (VPN Client)
----------------------
TAP adapter: 10.5.0.6
routes:
10.5.0.0 255.255.255.0 to 10.5.0.6

I can ping win2003 (192.168.40.137) on win2008.
I can ping 10.5.0.1 and 192.168.40.1 on XP but I can't ping 192.168.40.137

Any advice?
Thanks.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Acsess VMware client on host computer

Post by Mimiko » Thu Sep 22, 2011 12:19 pm

Just add to OpenVPN server config file (on WIn 2008) the following:

Code: Select all

push "route 192.168.40.0 255.255.255.0"

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Acsess VMware client on host computer

Post by janjust » Thu Sep 22, 2011 12:35 pm

Just add to OpenVPN server config file (on WIn 2008) the following:
Code:
push "route 192.168.40.0 255.255.255.0"
plus, inside the Windows VM, add a route

Code: Select all

route 10.5.0.0 mask 255.255.255.0 192.168.40.1
if required (in most cases the 192.168.40.1 host is already the default GW)

mkysoft
OpenVpn Newbie
Posts: 5
Joined: Thu Sep 22, 2011 12:43 am

Re: Acsess VMware client on host computer

Post by mkysoft » Thu Sep 22, 2011 1:07 pm

I added all. I can't ping 192.168.40.137. I tracert 192.168.40.137 on XP and log like this:

1 775 ms 510 ms 273 ms 10.5.0.1
2 * * * time out.
3 * * * time out.
4 * * * time out.

I think packet cannot pass win2008 to win2003(vm).

And sorry again 192.168.40.1 was another device on XP network. I mistake before.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Acsess VMware client on host computer

Post by janjust » Thu Sep 22, 2011 1:31 pm

make sure IP forwarding is enabled on the Win2008 box; normally this is done by setting a registry key

Code: Select all

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter:DWORD = 1
and rebooting. Alternatively you can also try this NETSH command

Code: Select all

netsh interface ipv4 set int "[name of the NIC]" forwarding=enabled 

mkysoft
OpenVpn Newbie
Posts: 5
Joined: Thu Sep 22, 2011 12:43 am

Re: Acsess VMware client on host computer

Post by mkysoft » Fri Sep 23, 2011 9:46 pm

I add win2008 and win2003 ip routing, but not ping anyway. I change some ips and try again. I give configuration and route tables here:

-------------------------------------------------------------------------------
Win2008 (Host)
-------------------------------------------------------------------------------
TAP-Win92 V9 adapter: 10.5.0.1/255.255.255.252
Wnet8 adapter (NAT-share host ip adress with host): 192.168.30.1/255.255.255.0 GW none (DHCP enabled and it gives IP at range 192.168.40.128 to 254)
:config file:
port 1194
proto tcp
dev tun
dev-node VPN
server 10.5.0.0 255.255.255.0
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
push "route 10.5.0.0 255.255.255.0"
push "route 192.168.30.0 255.255.255.0"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
client-to-client
route-method exe
route-delay 2

:route table:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
192.168.30.0 255.255.255.0 On-link 192.168.30.1 276
192.168.30.1 255.255.255.255 On-link 192.168.30.1 276
192.168.30.255 255.255.255.255 On-link 192.168.30.1 276
10.5.0.0 255.255.255.0 10.5.0.2 10.5.0.1 31
10.5.0.0 255.255.255.252 On-link 10.5.0.1 286
10.5.0.1 255.255.255.255 On-link 10.5.0.1 286
10.5.0.3 255.255.255.255 On-link 10.5.0.1 286
===========================================================================

---------------------------------------
Win2003 in VM (guest)
---------------------------------------
Wnet8 adapter: 192.168.30.128/255.255.255.0 GW 192.138.30.2
:manuely add route:
route add 10.5.0.0 mask 255.255.255.0 192.168.30.128

===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
192.168.30.0 255.255.255.0 192.168.30.128 192.168.30.128 10
192.168.30.128 255.255.255.255 127.0.0.1 127.0.0.1 10
192.168.30.255 255.255.255.255 192.168.30.128 192.168.30.128 10
10.5.0.0 255.255.255.0 192.168.30.128 192.168.30.128 1
Default Gateway: 192.168.30.2
===========================================================================

-------------------------------
XP (VPN Client)
-------------------------------
TAP adapter: 10.5.0.6/255.255.255.252 GW none
:config file:
client
dev tun
dev-node VPN
proto tcp
remote mkybap 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3

===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.2.1 192.168.2.21 10
10.5.0.0 255.255.255.0 10.5.0.5 10.5.0.6 1
10.5.0.4 255.255.255.252 10.5.0.6 10.5.0.6 30
10.5.0.6 255.255.255.255 127.0.0.1 127.0.0.1 30
10.255.255.255 255.255.255.255 10.5.0.6 10.5.0.6 30
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.2.0 255.255.255.0 192.168.2.21 192.168.2.21 10
192.168.2.21 255.255.255.255 127.0.0.1 127.0.0.1 10
192.168.2.255 255.255.255.255 192.168.2.21 192.168.2.21 10
192.168.30.0 255.255.255.0 10.5.0.5 10.5.0.6 1
224.0.0.0 240.0.0.0 10.5.0.6 10.5.0.6 30
224.0.0.0 240.0.0.0 192.168.2.21 192.168.2.21 10
255.255.255.255 255.255.255.255 10.5.0.6 10.5.0.6 1
255.255.255.255 255.255.255.255 192.168.2.21 192.168.2.21 1
Default
Gateway: 192.168.2.1
===========================================================================

I can ping 10.5.0.1 and 192.168.30.1 on XP (Client)
I can ping 10.5.0.6, 192.168.30.1, 192.168.30.128 on win2008 (Host)

Thanks.

mkysoft
OpenVpn Newbie
Posts: 5
Joined: Thu Sep 22, 2011 12:43 am

Re: Acsess VMware client on host computer

Post by mkysoft » Fri Sep 23, 2011 9:49 pm

I found my own mistake:

On win2003 (guest) I changed route to
route add 10.5.0.0 mask 255.255.255.0 192.168.30.1

Thanks for yours help janjust and Mimiko.

Post Reply