I am using a VMware Fusion 6 Windows XP guest to run some legacy Windows software on my Mac. I would like to turn off Internet access for the VM so Windows XP can't pick up any nastyware online. However, I would like to retain the ability to transfer files between the Mac and the VM.

What's the best way to achieve this? Thanks in advance.


You can use shared folders VMWare KB Article. This doesn't need a network connection. You can just disable the network adaptor for the VM.
Also you can use a host only network, which will use a virtual network between host and guest, with no connection to your ethernet or internet.
An alternative way is to disable the default gateway in the vm, but that's not secure.

| improve this answer | |
  • 2
    +1 This almost covers everything. For completeness sake, one can also use a firewall to close off everything except the file-transfer port. – harrymc Feb 10 '14 at 21:13
  • I wanna know why the disabling of gateway in the VM is not secure. It has always been my usual method, with no problems at all: simple (just one line), fast, there are no disconnections from established remote sessions (tested with VNC and SSH) to and from the VM, easily scriptable/programmable (to start and stop), and no reboots are required. There are even methods (as I wrote in my answer) for any operating system. – Sopalajo de Arrierez Feb 17 '14 at 4:39

If your problem is just internet, and your VM is Windows XP, the solution should be as simple as this:
Linux command-line: Quick way to disable internet (keeping LAN)?
The trick is simple: just removing the gateway. On that thread you have the short solution as a simple line, like:

route delete mask

(assuming as your gateway, that you can find entering "ipconfig").
or a solution more generic, as a (not much more longer) script.

-EDIT: as suggested by someone, it could be made:

route delete

so you don't even need to know what IP your gateway has.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.