1

I have an old Windows XP running inside a Virtualbox on a linux system as host os.

I used to disable the virtual network adapter so that the XP virtual machine had no network access at all. Now I want to access a local network printer from the XP machine but don't want to allow any other network connections.

How can I achieve this?

2 Answers 2

1

You can use Windows Firewall to restrict everything except local addresses or even only the printer's address and specific ports.

5
  • Is there no way to do this directly with the virtualbox or the host os? I think for security reasons this would be better than using a potentially compromised win xp firewall.
    – student
    Commented May 15, 2016 at 10:52
  • If you have access to the router you can apply restrictions there as well (for example using the Windows machine's MAC address).
    – Atzmon
    Commented May 15, 2016 at 11:13
  • The router seems to see only the mac of the host but not the mac of the virtualbox. I used NAT to configure the network in the virtual machine. Any idea?
    – student
    Commented May 15, 2016 at 12:09
  • Just changed it to bridged. Now it works.
    – student
    Commented May 15, 2016 at 12:27
  • @student Consider marking this thread as answer.
    – Atzmon
    Commented May 15, 2016 at 18:30
1

Found this solution at https://forums.virtualbox.org/viewtopic.php?t=62712

In the XP network configuration for the ethernet adapter, under Internet Protocol (TCP/IP) settings, assign a static IP address and do not specify a default gateway.

In Virtualbox, connect the virtual machine to a bridged network adapter.

This allows the XP machine to talk to other machines and printers on the same LAN, but prevents it from routing packets elsewhere.

(A very late answer - but this was one of my top search results so adding info here. )

2
  • That did not work for me. the VM does not have neither (intranet/internet) access.
    – Ray Cheng
    Commented Oct 9, 2019 at 23:21
  • @RayCheng still working for me with that setup. Presumably you checked that the static address and mask matched the local intranet. Also check for sharing etc. enabled on the XP network adapter if that's what you're doing. Also check ping IP addresses works - might be that you don't have support for older protocols enabled on other machines. Apart from that, out of ideas.
    – MZB
    Commented Oct 11, 2019 at 18:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .