VMware Communities
Erron
Contributor
Contributor
Jump to solution

How enable communication between Host and Windows 7 VM

Host: Mac OS X 10.6

Networking setting: NAT (also connected to work VPN)

VM: Windows 7

I use my mac for my development. I have an app server running with the Web Server. I also utilize the hosts so that I can map different web site urls with the same ip.

For example:

//On my Mac in /etc/hosts

127.0.0.1      www.testsite1.com www.testsite2.com

//On my Windows VM in the hosts file

987.78.125.125  www.testsite1.com www.testsite2.com

When I'm in the office and using bridged connections, this works fine. However, I would prefer to use NAT all the time.

Is this possible?


Thanks!

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

I've actually already answer your question however now that I know the particulars, and by the way you explained it so much better the second time! Smiley Wink

When not connected to the VPN on the Host and the Guest knows the IP Address the Web Server on the Host (an appropriate entry in the Guest's hosts file) then it should work however when connected to the VPN if you're Administrator is doing his/her job right you should not be able to connect to the Host from the Guest for the reason previously stated...  An unauthenticated/untrusted system (the Guest) should not be allowed to access an authenticated/trusted system (the Host) while the VPN on the Host is established to your company's network.

View solution in original post

0 Kudos
10 Replies
WoodyZ
Immortal
Immortal
Jump to solution

Sorry, but seriously it is not totaly clear what you've said.

Is the VPM running on the Host or the Guest?

"987.78.125.125" is not a valid IP Address and even if it was there is no reference to what it belongs to.

Generally speaking and without the VPN in play the Host and the Guest can be configured to access each other using Bridged, NAT and or Host Only, take your pick and configure your resources according to the type chosen.

Just an FYI if the VPN is properly configured and the VPN is not between the Host and Guest themselves but one or the other and a different endpoint then it should not allow the Host and Guest to communicate with each other as that goes against providing a secure tunnel between the endpoints.

If you want additional help I'd suggest you provide additional details describing the network topology and its corresponding information along with the different scenerios in which you want this all to work.  Like an in Office scenario and an Out of Office scenario, etc.

0 Kudos
Erron
Contributor
Contributor
Jump to solution

I'll try to be clearer.

First, I have a Web application that runs on jboss. It runs behing the Web Server of the Mac. So, on the mac, in the browser, I go to http://www.testsite1.com and my application comes up fine.

Additionally, I have a VM running on my mac that uses Window 7 as its operating system. Currently, the VM is network is configured to use NAT. On this machine, when I go to http://www.testsite1.com I get a broken page.  All other sites, e.g. http://www.google.com, comes up fine.

It's important to note that I'm at home and connected through to my company's Cisco VPN on the Host Mac.  At work, I use the Bridge connection and everything works fine.

My question, therefore, is it possible for me to utilize the NAT network configuration and be able to view the web application running on my Mac within the Windows VM. 

Finally, hopefully the screen shot clarifies. (My mac running vmware fusion in single window mode)

vm_issue.jpg

(I'm not sure how the resolution will appear, so I'm also attaching the image)

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

I've actually already answer your question however now that I know the particulars, and by the way you explained it so much better the second time! Smiley Wink

When not connected to the VPN on the Host and the Guest knows the IP Address the Web Server on the Host (an appropriate entry in the Guest's hosts file) then it should work however when connected to the VPN if you're Administrator is doing his/her job right you should not be able to connect to the Host from the Guest for the reason previously stated...  An unauthenticated/untrusted system (the Guest) should not be allowed to access an authenticated/trusted system (the Host) while the VPN on the Host is established to your company's network.

0 Kudos
KamiCrazy
Enthusiast
Enthusiast
Jump to solution

Can you please tell me where your webserver is? I can't work it out from your two posts. Is it on your mac or on another machine within your company network which you access via cisco vpn?

0 Kudos
Erron
Contributor
Contributor
Jump to solution

The web server is on my mac (In fact, it's the native mac server). My mac is connected to the VPN for accessing company resources like email, intranets, etc.

From: KamiCrazy <communities-emailer@vmware.com<mailto:communities-emailer@vmware.com>>

Reply-To: communities-emailer <communities-emailer@vmware.com<mailto:communities-emailer@vmware.com>>

Date: Tue, 28 Jun 2011 08:18:17 -0700

To: Intuit Admin <erron.austin@digitalinsight.com<mailto:erron.austin@digitalinsight.com>>

Subject: New message: "How enable communication between Host and Windows 7 VM"

VMware Communities<http://communities.vmware.com/index.jspa>

How enable communication between Host and Windows 7 VM

reply from KamiCrazy<http://communities.vmware.com/people/KamiCrazy> in VMware Fusion® (for Mac) - View the full discussion<http://communities.vmware.com/message/1780598#1780598

0 Kudos
KamiCrazy
Enthusiast
Enthusiast
Jump to solution

When you select NAT networking it uses a different virtual network adapter inside OS X called vmnet8.

You must change the hosts file in your windows vm to use the vmnet8 ip address of your mac. This ip is 172.16.9.1 on my install of fusion. It maybe different for you.

Have you done this when you changed the networking from bridged to NAT?

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

KamiCrazy, This thread has already be answered, Re: How enable communication between Host and Windows 7 VM and Erron already knows that and has configured the hosts file in the guest.

The issue is when connected to the VPN there is no network connectivity between the Guest and Host, nor should there be and why did you raise this already correctly answered thread anyway.

0 Kudos
KamiCrazy
Enthusiast
Enthusiast
Jump to solution

His first post states that he has set his hosts file in the windows VM to a certain IP address and it works in the office using bridged mode.

Then in the screenshot of his second post he shows in the note that this IP address has not changed but he has then changed the configuration of the networking for fusion to NAT.

This means that he needs to change the hosts file to the vmnet8 ip address of his mac in order for this to work.

In my experience a VPN connection doesn't limit host to guest networking. From the information the OP has provided it appears that he simply has the host file set incorrectly for NAT.

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

First of all the IP Address show is not a valid address and Erron was told that in my first reply.  Also in the reply that is marked as the correct answer, I said "When not connected to the VPN on the Host and the Guest knows the IP Address the Web Server on the Host (an appropriate entry in the Guest's hosts file) then it should work" which means the IP Address in the Guest's host file has to be that of vmnet8 when switched to NAT and that's a no brainer.

As far as Guest/Host Network Connectivity when the Host is connected to a VPN to other then the Guest then it is quite normal for there not to be connectivity and any Network Administrator that is going to allow an unauthenticated/untrusted system (the Guest) normal network access to the authenticated/trusted system (the Host) while the VPN on the Host is established to the company's network should be fired.  If one is going to allow an unauthenticated/untrusted systems to directly communicate with authenticated/trusted systems while the VPN is active then it's senseless to use a VPN.

0 Kudos
KamiCrazy
Enthusiast
Enthusiast
Jump to solution

I'm just trying to help the guy.

In my opinion he has made a simple mistake which if corrected he will get what he wants.

In terms of your opinion about endpoint security and VPN's. I disagree with what you say because he already states that whilst NAT is active he can go to other sites just not the webserver on his mac. This must mean that his VPN is not blocking host to guest communication or else it would not be forwarding internet requests from the guest to the outside world.

In fact I am willing to bet that whilst he has NAT active he can access company resources like querying the company internal DNS server for instance, and if he set the company DNS server as primary he would be able to access internal websites, email servers etc. from the guest.

0 Kudos