2
I'm a bit rusty on virtualbox.
I have a VM with this setup
You see an icon to access the Host machine, and the C drive available.
I would like to temporarily amend that to just a particular folder available
I see an option here for adding a particular folder from the host as a folder on the virtual machine.
But that option doesn't seem that relevant to me because I already seem to have the host's whole C drive available from the virtual machine.
What i'd like is, temporarily, to have only the host's folder viewable from the VM, rather than the host's whole C drive viewable/accessible from the VM.
(It's a Win7 host and a Win XP VM but that's perhaps not relevant)
UPDATE ADDED
Heavy has pointed out this is Windows File Sharing. He's right.
So the question is, How can I restrict a virtual machine from using Windows File Sharing? I want to make this restriction at the host, rather than the VM itself
On the host machine, we see the connection (the guest machine is really 10.x.y.z but virtualbox is putting it behind [virtual] NAT so it's showing as 192.168.56.1). My host IP is 10.x.y.z though virtualbox installs a virtual network adaptor 192.168.56.1
I have tried these two firewall rules but they haven't worked. (An outbound rule and an inbound rule).
The protocols and ports tabs (and maybe my error is here) shows
and
We see here they haven't worked
The Guest can still see port 445. nmap run from guest
file sharing still works.
You're currently using the built in Windows network File and Printer Sharing, not the VirtualBox Shared folders. The VB shared folder will show up under the server name
VBoxSvr
– heavyd – 2015-10-13T06:24:45.037Use the NORMAL Windows Firewall controls to disable file sharing if you don't understand how the advanced settings work (which you don't). Alternatively, don't share your entire C: drive to begin with. – qasdfdsaq – 2015-10-15T13:08:04.817
@qasdfdsaq i've always used the "advanced" rules no problem, (though up till now it has only been to allow/block inbound connections from unwanted IPs), so local IP is then the interface the service is bound to. I don't know what "normal" rules you are referring to. Could you elaborate – barlop – 2015-10-15T21:02:01.647
@Barlop: Control Panel => Windows Firewall => Allow Program or feature through Firewall. I'm suggesting it because you seem unaware of the existing advanced rules to allow file sharing since you've tried to create a rule to block a port that conflicts with multiple wider rules to allow the same port. – qasdfdsaq – 2015-10-16T19:00:01.563
@qasdfdsaq I simply forgot about the existing default/native rule for file sharing.(With XP it was easier to see because there were less native/default rules. Win7 has a load of rules to wade through. Out of sight, out of mind). Next time i'm in front of the comp in question, i'll look at / amend the existing rule and delete the new ones I created – barlop – 2015-10-16T19:42:30.987
And therein lies the difference. In the In the normal Windows Firewall control panel there is just one rule and two checkboxes for file sharing. In Advanced settings there are 18. – qasdfdsaq – 2015-10-17T23:52:41.653