VMware Communities
kwarnke
Contributor
Contributor

How do I share the network connection inside the Guest OS with the Host OS?

I'm using VMWare 6 and I would like to be able to connect to a VPN within a Guest OS and then utilize that VPN connection from the Host OS. Is this possible? If so, how?

Doing the reverse (sharing the Host's VPN connection with the Guest) is very simple. I'd like to go the other way.

Why you ask? The VPN software does not run on Vista but my Host is running Vista. There you have it.

Thanks!

0 Kudos
15 Replies
Peter_vm
Immortal
Immortal

I'm using VMWare 6 and I would like to be able to connect to a VPN within a Guest OS and then utilize that VPN connection from the Host OS. Is this possible? If so, how?

Doing the reverse (sharing the Host's VPN connection with the Guest) is very simple. I'd like to go the other way.

And why you can't do it the other way?

0 Kudos
kwarnke
Contributor
Contributor

Because I don't know how... hence the question Smiley Happy

The Host OS is Windows Vista. The VPN software does not work on Vista. I want to create an XP Guest image that can run the VPN to create the network then utilize that VPN network in the Host OS (Vista). I'm not sure it's even possible which is why I'm posting the question.

Thanks

0 Kudos
Peter_vm
Immortal
Immortal

Oh, I have asked because you said:

"Doing the reverse (sharing the Host's VPN connection with the Guest) is very simple."

and I wanted to know how, since it is so simple.

0 Kudos
kwarnke
Contributor
Contributor

Having the Guest OS use the Host OS's network connection is how VMWare Workstation works "out of the box" (bridge or NAT).

Does anyone know how to share your Guest OS's network with your host?

0 Kudos
Peter_vm
Immortal
Immortal

You do the same in guest. You need to setup routing and NAT (not VMware NAT) in your guest.

But, did you manage to install VPN in your guest and make connection from there?

That is the first step.

0 Kudos
kwarnke
Contributor
Contributor

Yes. I am able to load my VPN software and connect as expected within the Guest OS.

How would I setup the guest (XP) to allow my Host to gain access once it's connected to the VPN?

Thanks!

0 Kudos
Peter_vm
Immortal
Immortal

You can start by trying to route some host traffic through XP.

Enable IP routing on XP and set route commands approprietly to your networks.

Also modify routing on host to use XP as a route gateway for specific network.

0 Kudos
kwarnke
Contributor
Contributor

I'm going to need a little more help with:

Enable IP routing on XP and set route commands approprietly to your networks.

Thanks!

0 Kudos
Peter_vm
Immortal
Immortal

Sure. Google is your friend:

http://www.google.com/search?hl=en&q=routingxpenable&btnG=Google+Search&meta=

0 Kudos
kwarnke
Contributor
Contributor

So I think there is a flaw in this idea (and maybe what I want to do in general).

If you use your host's Internet to connect to the VPN from inside your Guest, then you jack with the routing on the host, it'll break the VPN connection :smileylaugh:

I'm gonig to try using 2 different connections (1 to leave up for Internet and 1 to route to the guest). We'll see if that works.

0 Kudos
Peter_vm
Immortal
Immortal

So I think there is a flaw in this idea (and maybe what I want to do in general).

Could be... Some VPNs do not allow split tunnels....

If you use your host's Internet to connect to the VPN from inside your Guest, then you jack with the routing on the host, it'll break the VPN connection :smileylaugh:

Not if you route only specific (possibly private network) through an XP gateway.

I'm gonig to try using 2 different connections (1 to leave up for Internet and 1 to route to the guest). We'll see if that works.

Also if your guest is using bridged connection, it is not dependent on host routing.

0 Kudos
kwarnke
Contributor
Contributor

So if I switch to Bridged (instead of NAT) then messing with the Host's routing does not mess up the VPN.

However, routing the Host to the Guest with the VPN running doesn't seem to work either.

Routing to the Guest when the VPN is NOT connected seems to work. However, once I connect to the VPN in the Guest, the Host stops being able to surf as expected.

Once I connect with my VPN software I have 2 IP addresses in the Guest. The first is the one assigned from my local router. The other is the IP address assigned from the VPN software (it creates a virtual network adapter).

Any other ideas?

0 Kudos
Peter_vm
Immortal
Immortal

Please send me PM with specific results:

IPCONFIG /ALL and ROUTE PRINT from host OS

IPCONFIG /ALL and ROUTE PRINT from guest OS with VPN inactive

IPCONFIG /ALL and ROUTE PRINT from guest OS with VPN active

0 Kudos
kwarnke
Contributor
Contributor

done.

I think it may just be that the VPN software PREVENTS this from happening.

thanks!

0 Kudos
Peter_vm
Immortal
Immortal

I can give you my example:

-


I have my Home VMware Host at 192.168.100.50

My home LAN Gateway is 192.168.100.254

Added XP guest with 192.168.100.51 Gateway 192.168.100.254

In XP guest, I have created VPN connection to MyOffice.dyndns.org

It establishes connection with IP 172.1.2.200

I have enabled XP ICS on that VPN. That makes NAT router in guest.

Now on my VMware Host I have added this route:

route add 172.1.2.0 mask 255.255.255.0 192.168.100.51

After that I can ping my office LAN server at 172.1.2.3 from VMware Host.

I can also perform RDP on 172.1.2.3 from VMware Host without any trouble.

That my working VMware guest based gateway, using guest VPN connection.

Server at 172.1.2.3 sees my connection as coming from 172.1.2.200, even though I'm using 192.168.100.50.

0 Kudos