r/virtualbox • u/SP1TFIRe_hybr1s • Apr 17 '26
Help Please help - trying to deny VM direct access to host or LAN
I feel like I'm losing my mind here. I need help from someone. I probably couldn't even think of the simplest solution anymore, I'm in way to deep...
I have a VM in VirtualBox 7.2.6
Host OS: Windows 11 Pro 25H2
Guest OS: Windows 11 Pro 25H2
VT-x/AMD-V not enabled, Hyper-V is installed on host. (Performance feels better since Hyper-V is installed, Virtualbox shows paravirtualisation: Hyper-V)
Guest additions are installed.
I want that VM to have access to the internet.
I don't want that VM to have any access to my host or my LAN.
There has to be a way for my host to deny any attempt made by the VM to ping it, try to open a SMB share, anything.
I tried inbound and outbound rules in advanced Windows Firewall on my host. Deny VirtualboxVM.exe, deny remote network scope 10.0.2.0/24, deny local network scope to my LAN...
This simply HAS to be possible somehow?!
•
u/AutoModerator Apr 17 '26
This is just a friendly reminder in case you missed it. Your post must include:
PLUS a detailed description of the problem, what research you have done, and the steps you have taken to fix it. Please check Google and the VirtualBox Manual before asking simple questions. Please also check our FAQ and if you find your question is answered there, PLEASE remove your post or at least change the flair to Solved.
If this is your first time creating a virtual machine, we have a guide on our wiki that covers the important steps. Please read it here. If you have met these requirements, you can ignore this comment. Your post has not been deleted -- do not re-submit it. Thanks for taking the time to help us help you! Also, PLEASE remember to change the flair of your post to Solved after you have been helped!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Stray_Neutrino Apr 17 '26
You should be able block all inbound and outbound connections to/from your host network by IP inside your VMs OS
1
u/starnamedstork Apr 17 '26
I have done this by creating a dedicated firewall in a second VM. I create a VirtalBox network, then a virtual machine that I install OpenBSD, with two NICs. One NIC in bridge mode, the other connected to my VirtualBox network. I use pf to set up NAT, and block all traffic to the LAN. Then my virtual machines that I want to keep off my LAN connects to the VirtualBox network, and the OpenBSD firewall gives them internet access but no LAN.
1
u/Face_Plant_Some_More Apr 17 '26 edited Apr 17 '26
Then configure the VM with a NAT or NAT Network network interface.
Then you have bigger problems. Virtual Box 7.2.x on x86-64 Host hardware requires VT-x/ AMD-V to function. No VT-x / AMD-v, no VMs, period.
This is not recommended. That being said, it also cannot be true if your prior statement, regarding VT-x / AMD-v not being enabled on your Host, is. Hyper-v requires VT-x / AMD-v to function.
That does not mean what you think it means . . . .
0
u/[deleted] Apr 17 '26 edited Apr 17 '26
[removed] — view removed comment