Windows 10 offers a safe and secure environment – Sandbox – to try and test certain capabilities. It is based on Hyper-V technology and allows you to test and run untrusted applications in total isolation. Once the job is done, you can discard it without affecting the system. In this post, we will see how to enable or disable Networking in Windows Sandbox.
Disable Networking in Windows Sandbox
When you close the Sandbox, all the applications with all its files and state are permanently deleted. Networking in Windows Sandbox allows users to enable or disable network access within the sandbox. Disabling network access can be used to decrease the attack surface exposed by the Sandbox. To disable it using the Registry:
- Open Registry Editor.
- Go to the \Microsoft\Windows\Sandbox Registry key
- Change the value of AllowNetworking to 0.
- To enable the Networking feature, change its value to 1.
Open the Registry Editor in Windows 10. For this, press Win+R in combination to open the ‘Run’ dialog box.
In the empty field of the box, type ‘regedit’ and press ‘Enter’.
When the Registry Editor opens, navigate to the following path address –
Now, create a new 32-bit DWORD value ‘AllowNetworking’. It doesn’t matter whether you are running 32-bit or 64-bit Windows, you still need to use a 32-bit DWORD as the value type.
Now, to disable the Networking in Windows 10 Sandbox environment set the value for the above key to ‘0’.
To enable the Networking feature in Windows 10 Sandbox, delete the entire key or set its value to 1.
Using Group Policy
Alternatively, you can use Group Policy editor to disable Networking in Windows Sandbox.
Simply go to the setting below in the left pane of the Local Group Policy Editor.
Computer Configuration\Administrative Templates\Windows Components\Windows Sandbox
Then, switch to the right pane of Windows Sandbox in Local Group Policy Editor and double click Allow networking in Windows Sandbox policy and set it to Disabled.
This policy enables or disables networking in the sandbox. You can disable network access to decrease the attack surface exposed by the sandbox.
If you enable the policy, networking is done by creating a virtual switch on the host, and connects the Windows Sandbox to it via a virtual NIC.
If you disable the policy setting, networking is disabled in Windows Sandbox,
Save and exit.
That’s all there to it!