WoodyZ
Immortal
Immortal

Share Windows XP Guest Internet Connection with OS X Host HOWTO

Sometime Users may find themselves in a position that they need to share the Windows XP Guest Virtual Machine’s Internet Connection with the Mac OS X Host and this document will show one of the ways it can be accomplished.

Requirements

OS X 10.4.9 or Higher

VMware Fusion 1.0 or Higher

Microsoft Windows XP SP2 VMware Fusion Virtual Machine

Internet Connectivity from within the XP Guest Virtual Machine.

Active* Network Connection in OS X Host.

While the information presented in this document was written on Mac OS X Tiger and VMware Fusion Windows XP Pro Virtual Machine using a Belkin 54g WiFi USB Network Adapter to provide the Guest's Internet Connectivity the foundation and general directions presented should work on any Device that Internet Connection Sharing can be enabled on. It should also work with Mac OS X Leopard and or Microsoft Windows Vista as well although the graphics and explisit directions would vary.

"*" See comments in document for asterisk reference.

File Attached: Share_Windows_XP_Guest_Internet_Connection_with_OS_X_Host_HOWTO.pdf

0 Kudos
65 Replies
admin
Immortal
Immortal

Thanks for doing this! I added a link from the Power User's Guide to this thread.

0 Kudos
jbfryman
Contributor
Contributor

I'm actually interested in doing something a bit more elaborate. I travel a lot, and it's somewhat cumbersome to deal with the problems that come with that. My Mac always connects to local networks easily (wireless or wired, it varies based on location), but I need to run VPN software that is Windows-only. So I wind up with (Internet) -> Mac -> Fusion VM -> VPN.

The VPN connection works fine, but I'd like to feed that back to the Mac so my Mac apps can then use the VPN. So what I'd like to do is define a second NIC in Fusion, do Windows ICS across that, and have the Mac redirect my local apps through this virtual nic channel.

Has anyone tried this? I can't seem to make the Mac talk to the second NIC I defined directly. For security purposes, I wanted to make it Host-Only on the second NIC . . . but I'd settle for any solution at this point. I need to point Entourage or Safari/Firefox at this second virtual NIC. I can't trick the VM by re-using the wireless as I sometimes need that to reach the Internet.

Thoughts?

0 Kudos
uruiamme
Contributor
Contributor

Sort of Yup. I have put Fusion through its courses over the last 2 months I have been using it. Let me tell you... this was technically silly but it worked for me fine, and unbelievably simple.

So my situation was similar. I went out with my MacBook Pro laptop on a little excursion for a week. I knew I would be staying where the Internet was only available on dial-up. So I wanted to try out a new Kyocera EVDO card from Alltel. It uses the cellular network for connection and it is pretty fast. KPC680. It is an Express Card that fits into a MBP, but they only have Windows (modem) drivers for it. If I had been using a USB adapter, the problem I describe below would have been solved without issue since there is a Mac driver for that.

Well I had been running BootCamp, but I was evaluating Fusion and so I was running Mac OS X Tiger and Windows XP Pro in a vm window. I plugged in the card so Windows would have Internet access. Now how do I feed it back to Mac? Well, I had picked up a "just in case" USB-to-Ethernet adapter along the way from eBay for under $10. I dug it out, installed the driver for it in WINDOWS while running Fusion, and then I shared my new Ethernet interface using ICS. This was my first time to successfully use ICS in many years -- I generally have found it ridiculously worthless in most networks. But it worked here like a champ.

All I had to do is plug in a short Ethernet cable (I had a 12" cable) from the dongle to my Mac's Ethernet port and tell the Mac to do DHCP on it. This worked as good as I needed for it to. I felt stupid having a "loopback" cable on my laptop, but for all its stupid looks it made Mac OS X happy to get Internet access. Haha, it would have been funnier if I had plugged in the USB dongle onto the left side, used a long cable to wrap around the back of the laptop, and plugged it into the right. Would have made for an interesting conversation in a public place.

This can be done a lot of different ways... whether it is a modem or whatever. As long as you are forced to use a Windows driver, then you just tell Fusion to "connect" the incompatible device to your VM, plug in a USB-to-Ethernet, and use ICS and DHCP to get you Mac on your PC network. Incidentally, the same could be done with wireless to PC to USB to Ethernet to Mac... in some situations (like old WiFi-802.11b) I found that the Windows wireless driver is better than the Mac! You could also utilize a Linux driver for an obscure piece of networking hardware if Linux is your VM.

Bonus points if you use a Firewire-to-Ethernet or some other bazaar loopback like bluetooth.

So this should work for VPNs... If your VPN is on a LAN ... I might propose this method: Use a USB-to-LAN adapter to plug in directly to your WINDOWS VM. Do your VPN in Windows. Now, use the PDF document as a guide to use your own wireless to feed VPN traffic to the Mac OR use a second USB-to-LAN adapter. Obviously this would eat up 2 USB ports and devices. But maybe you could get VMware Fusion to carrry traffic from Windows to Mac on the virtual LAN connection.

If your VPN is on Wireless... I would do this: use the Airport on the Mac side, and use NAT mode? (I think) to bring in your nertwork to Windows VM. Do your VPN there. Now, feed it back to Mac using a USB-to-LAN adapter and plug it into your Mac's LAN jack, use DHCP and possibly use a manual setting to get the Mac side to see the correct DNS server and gateway. If having two hot connections on the Mac side is too difficult for routing and all, then buy a USB-to-WiFi adapter and bring in the VPN to Windows first as above.

I hope you are a network pro and tell us how it's done!

0 Kudos
WoodyZ
Immortal
Immortal

All I had to do is plug in a short Ethernet cable (I had a 12" cable) from the dongle to my Mac's Ethernet port and tell the Mac to do DHCP on it. This worked as good as I needed for it to. I felt stupid having a "loopback" cable on my laptop, but for all its stupid looks it made Mac OS X happy to get Internet access. Haha, it would have been funnier if I had plugged in the USB dongle onto the left side, used a long cable to wrap around the back of the laptop, and plugged it into the right. Would have made for an interesting conversation in a public place.

This can be done a lot of different ways... whether it is a modem or whatever. As long as you are forced to use a Windows driver, then you just tell Fusion to "connect" the incompatible device to your VM, plug in a USB-to-Ethernet, and use ICS and DHCP to get you Mac on your PC network. Incidentally, the same could be done with wireless to PC to USB to Ethernet to Mac... in some situations (like old WiFi-802.11b) I found that the Windows wireless driver is better than the Mac! You could also utilize a Linux driver for an obscure piece of networking hardware if Linux is your VM.

Bonus points if you use a Firewire-to-Ethernet or some other bazaar loopback like bluetooth or WiFi! I would be really impressed if someone did this with WiFi or if it still worked in Vista Home Premie.

On a MBP or any Mac that has an AirPort built-in you do not need to use a USB to Ethernet and cable it back to the Mac's ethernet port as you can simply use the Mac's AirPort as describe in the document I wrote to accomplish the same thing without additional hardware. Although also as described in my document anything that gives you active link status is all that required to create the loopback and certainly what your done fulfills that requirement. Although the main point I wanted to make is it can be done with nothing more that the Notebook and the ICS Shared Device because I far as I know all Intel based Mac Notebooks have a built-in AirPort.

0 Kudos
edrons
Contributor
Contributor

hello!! Seems a great tool, but

i got a Vista VM on my Mac

how can i do this please ?

Smiley Happy

0 Kudos
WoodyZ
Immortal
Immortal

hello!! Seems a great tool, but i got a Vista VM on my Mac how can i do this please ?

The document I wrote is specifically for Windows XP however using it as a guideline in conjunction with how Windows Vista handles ICS (Internet Connection Sharing) one should be able to utilize a Guest's Internet Connection in a similar manner as described in my document.

Look in the Windows Vista Help Files for ICS (Internet Connection Sharing).

Also here are a couple of links on the topic from Microsoft's web site.

Windows Help and How-to - Change Internet settings for ICS (Internet Connection Sharing)

Windows Help and How-to - Using ICS (Internet Connection Sharing)

0 Kudos
Philip_Saunders
Contributor
Contributor

I've just been trying to implement this HOWTO and can't.

Here's my situation: my company won't provide a VPN that works on our Macs. So one idea I had was to run the approved VPN in a virtual windows environment and bridge that back to the Mac host OS. Found this thread, figured I had it knocked.

But. On a MacBook Pro running OS X 10.5.4, VMWare Fusion 1.1.3/XPProSP2, the Wireless never shows up in the Network Connections; and even if it did, our Active Directory Group Policy disables ICS.

So I need a way to do this purely within VMWare and the Mac OS. By adding Virtual Interfaces, perhaps? I see the white paper on how to do that; but then a recipe for doing this reverse-bridge will be needed.

Thank you for this wonderful resource.

0 Kudos
alex999
Contributor
Contributor

I am trying to do this as well with the 2.0 and loopback Ethernet cables, and it just does not work since as soon as the ICS connection is up the Internet connection (VMWare interface) drops and comes back trigerring dhcp which never completes.

Has someone configured this with Fusion 2.0 already? If so, can you post a configuration example please?

Thanks

0 Kudos
WoodyZ
Immortal
Immortal

I am trying to do this as well with the 2.0 and loopback Ethernet cables

You cannot use a loopback device because Mac's Ethernet Adapter uses auto-sensing technology and in turn you are just nullifying the connection by using a loopback.

0 Kudos
alex999
Contributor
Contributor

I am using one Ethernet USB adapter with an Ethernet cable connecting the usb one defined only in Windows and the port on the MBP, this is what I meant by loopback.

What do you suggest to do exactly?

0 Kudos
WoodyZ
Immortal
Immortal

I know what this thread is about since I'm the one that started it and wrote the directions however forgive me if the sounds like a dumb question what are you trying to do? Now the reason I asked that is because you've jumped into the thread with a issue/problem/question whatever and not only didn't express accurately what you originally said but really haven included all of the particulars which of course make it harder to provide an explicit and specif solution based on what you're trying to do that is different then what I presented in my document. So all I can say without knowing all of the particulars is read and follow the document making the appropriate substitutions and the key here is appropriate substitutions otherwise provide the appropriate information to have a clear and complete understanding of the topology of the network connections your trying to make. Have a look a as a guideline.

If your looping back the USB Nic to the BMP's Ethernet Adapter what are trying to achieve? How and with what are you connecting to the Internet and is it on the Host or the Guest? How are all the relevant devices configured etc, etc... Need information to process a solution to whatever it is your trying to do that you've yet to clearly express.

0 Kudos
alex999
Contributor
Contributor

OK, I need to access a VPN which only works in XP, and therefore want to share this connection back to the MAC.

I have one VM for XP. I run Fusion 2.0.1.

I connect to my LAN using the wireless airport DHCP connection, the LAN connects me to the Internet using a router.

I have a USB Ethernet adapter setup in XP.

Now, how can I share my XP LAN connection back into the MAC so that I can use the VPN connection?

I think this is what you described but with a wireless usb adapter.

Any help is more than welcome here.

0 Kudos
davelong9050
Contributor
Contributor

WoodyZ,

Sorry I missed your call.

Down to Printer Pass Through and any other performance improvements that might come up.

Dave

0 Kudos
FreakyChokra
Contributor
Contributor

Hi Woody.

Your guide is really a pretty simple n straight-forward to follow through guide while implementing on normal hardware.

But I humbly request your guidance in my really unique n kinda looping problem. May you please help me, please?

I'm tired of running Windows. Bugs, viruses (actually virii, but ..u know), bloatware... Yet so far I've not eXPerienced (pun intended!) anything that can make my life easier than otherwise.

Hence, I just switched to a Mac Pro with Leopard, which is currently updated to 10.5.6 n working A-OK!

But where I reside, I've no other ISP but one who gives me net access over LAN, but using PPPoE.

Now, if only that was something, then Mac was never a problem as Mac has a built-in dialer for PPPoE.

But its a dialer program we need installed and running that gives us access n monitors the Hours/MB usage, etc.

N he doesn't have any support for Mac or Linux or any other OS.

So, I've come this far to dialing to connect via Windows SuXP on my Mac Pro. Xp is installed in VMWare Fusion Version 2.0.1 (128865).

My rig is like this:

OS X 10.5.6 using VMware Fusion 2

Microsoft Windows XP SP2 VMware Fusion Virtual Machine

Active* Network Connection in OS X Host, which is configured in Bridge mode for Win XP.

There are 2 things:

A) The login name/password is locked to the MAC id of the LAN/NIC. --> I've fixed this using MAC spoofing in WinXP in the device properties of the onboard NIC.

B) As much networking I understand, I need to make the XP VM as gateway for OSX. so I've tried setting its (PPPoE) dialup connection with Internet Connection Sharing (ICS).

Tried specifying the XP network IP (192.168.0.1) as DNS, GATEWAY, ROUTER, PROXY (under proxy configuration), etc.

But the thing is when I load safari or firefox, the page keeps waiting endlessly but there is no data transfer between the 2 machines/ OSes! ;(

For Proxies, I installed Proxy+ in Windows and gave it a shot. Prior to Proxy+ used WinGate which was quite complicated for me n hence, I chucked it

Now, can U suggest me something by which I can redirect the complete internet bandwidth to Mac,

as I would then have Windows running nothing else but only as a Internet Gateway server for Mac.

Hoping to hear from you soon.

-Regards,

Freak Chokra

0 Kudos
neilinnz
Contributor
Contributor

Can I just ask a question as I can't work out how to get this working.

I have an iMac with built in Ethernet and Wifi.

I am running a Windows XP virtual machine with bridged networking. Within the virtual XP machine I only have Local Area Connection under my network connections. Do I have to have some other USB connected device, either Wifi or ethernet in order to get this to work? I can't see how XP can have Local Area Connection AND wireless without a USB device. Without any further hardware (like the document suggests) how do you get a second connection within XP?

The ethernet is connected to a LAN and my Wifi is normally off but I can use it for this purpose if necessary.

Thanks, Neil

0 Kudos
WoodyZ
Immortal
Immortal

What is it that you're trying to do? This thread and the accompaning document is for being able to share an Internet Conection in the Guest with OS X when OS X doesn't have it itself. Is that what your looking to do? If so how are you providing Internet Access in the Guest while the Host doesn't have it?

0 Kudos
neilinnz
Contributor
Contributor

What I am trying to do is use the VPN connection I have in Windows XP (in virtual machine) thru the host OS X.

I have a virtual machine of XP, bridged to OS X and connected to the internet using ethernet via a hub. Can I possibly connect to my vpn in windows XP and somehow also use that VPN connection from within OS X? The document suggests it's possible without any other hardware but the instructions have a USB Wifi connected too.

0 Kudos
WoodyZ
Immortal
Immortal

The document suggests it's possible without any other hardware

The document does not suggest that because it requires that you have an Internet Connection in the Virtual Machine that you can enable ICS on.

but the instructions have a USB Wifi connected too.

Yes it does as that is an example of how one could have an Internet Connection that originated in the Guest and is capable of ICS and thus being used by the Host as well.

It is not unusual for a VPN connection to disable the ability to access other LAN Resources while the VPN is established so I can't answer it for you other then to say that if the VPN connection allows ICS and Split Tunneling then I would think it's possible however you should talk to your Network Administrator to see if what you want to do is permissible.

0 Kudos
neilinnz
Contributor
Contributor

OK, I'm not sure it's possible in my case then. Was worth a try.

Thanks for your replies and help.

0 Kudos