Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to run Windows VM on my Windows Server and I want to access one port of this VM I can configure VM networking as NAT with port forwarding, this works fine. But I want the machine to do not have access to the internet - anything except incoming connections on specific port.

Is this possible to configure in VirtualBox and how?

UPDATE:

After few partial answers and discussion I have found this utility PassPort. Now I have working solution:

  • configure VM with host-only networking
  • setup PassPort to forward host_ip:host_port to VM (vbox_only_interface_ip:vm_port)
  • open host port at Windows Firewall

VM is accessible at host interface, from LAN and from host and VM has no access to LAN.

I am just wondering if this utility is nescessary. Is it possible to configure this without PassPort?

share|improve this question

2 Answers 2

Your firewall would need to block outgoing traffic for that IP Address

share|improve this answer
    
With NAT option, I would have to block outgoing traffic for all VMs in the system. I can open port in windows firewall, but I cannot forward port to another interface if I configure the VM to use host-only network. It would be solved if windows firewall allows to configure port forwaring options and not "open-only" options. –  Jiri Apr 25 at 8:12
    
Which system does the port forwarding? Is this system not capable of firewalling? –  MichelZ Apr 25 at 8:27
    
Port forwarding I am using is configured in virtualbox, in networking section, option NAT. This exposes the port to host interface and I can open port at host Windows firewall. But machine has internet access. If I configure host-only networking in virtualbox, the VM has no internet access and it is not accessible on host main interface (only on virtualbox added virtual interface), so the port opening of host firewall is not an option. –  Jiri Apr 25 at 8:31
    
OK, then I'd suggest the following: - Install a firewall on a VM - Use it with NAT option - Add a second interface - Connect the Firewall with the VM you're trying to protect - Control traffic using the Firewall VM OR Block outgoing traffic on the VM you're trying to protect using that VM's firewall –  MichelZ Apr 25 at 8:49
    
Thanks, yes that is solution - to block access at VM. I also thought about re-configuring default gateway in NATed interface at VM, so all outgoing traffic will be routed to non-existent IP address. Any solution that is using some virtualbox networking capabilites seem to be more correct to me. I will wait shortly for any better solution and I will close the question if no better options. –  Jiri Apr 25 at 12:41

Use "Host-only network" - available from Virtualbox 2.2 and up.

share|improve this answer
    
If I understand this correctly this should work the same way as "host-only network" option in virtualbox. I tried that but I cannot access the VM port from outside because it is not in the same network, but yes - VM has no internet connection this way. –  Jiri Apr 25 at 7:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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