Accessing host machine IIS from a guest OS in VMWa

2020-06-16 05:35发布

问题:

How can I access a site configured in IIS 7 on the host machine from a guest OS in VMWare (Fedora 10). I have configured the VM to use "NAT"

回答1:

Depends on your network configuration of vmware product you are using (player, server, workstation). If it is set for a bridged mode, then you can do it as any other machine - by host machine's IP. If it is a "host only" or NAT mode - check what is the gateway IP for the guest (/sbin/route), and try using it:

# /sbin/route
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         10.x.y.z        0.0.0.0         UG    0      0        0 eth0

In this case, 10.x.y.z is the ip of the host machine.



回答2:

Pretty easy...

Step 1 Configure IIS on the host OS to include a binding, if you would like to use a "url". for example mySite.com

Step 2. In the Guest open up the hosts file c:\windows\system32\drivers\etc\hosts.

Add the entry

[hostip address] [host iis bining url]

Example

192.168.0.1 mySite.com

restart your browser in the guest, and you should be good to go.



标签: iis VMware