How to Enable or Disable Networking in Windows Sandbox in Windows 10


Windows Sandbox provides a lightweight desktop environment to safely run applications in isolation. Software installed inside the Windows Sandbox environment remains "sandboxed" and runs separately from the host machine.

A sandbox is temporary. When it's closed, all the software and files and the state are deleted. You get a brand-new instance of the sandbox every time you open the application.

Starting with Windows 10 build 20161, a new group policy setting was added that enables or disables networking in the sandbox. You can disable network access to decrease the attack surface exposed by the sandbox.

If you enable or do not configure this policy setting, networking is done by creating a virtual switch on the host (Windows 10 PC), and connects the Windows Sandbox to it via a virtual NIC.

If you disable this policy setting, networking is disabled in Windows Sandbox.

This tutorial will show you how to enable or disable networking in Windows Sandbox for all users in Windows 10.

You must be signed in as an administrator to enable or disable networking in Windows Sandbox.

Windows Sandbox is only available for the Windows 10 Pro and Windows Enterprise editions build 18305 and higher.


Enabling networking can expose untrusted applications to the internal network.



Contents

  • Option One: Enable or Disable Networking in Windows Sandbox in Local Group Policy Editor
  • Option Two: Enable or Disable Networking in Windows Sandbox using a REG file






OPTION ONE

Enable or Disable Networking in Windows Sandbox in Local Group Policy Editor


1 Open the Local Group Policy Editor.

2 Navigate to the key below in the left pane of the Local Group Policy Editor. (see screenshot below)

Computer Configuration\Administrative Templates\Windows Components\Windows Sandbox

How to Enable or Disable Networking in Windows Sandbox in Windows 10-windows_sandbox_networking_gpedit-1.png

3 In the right pane of Windows Sandbox in Local Group Policy Editor, double click/tap on the Allow networking in Windows Sandbox policy to edit it. (see screenshot above)

4 Do step 5 (enable) or step 6 (disable) below for what you would like to do.


5 To Enable Networking in Windows Sandbox

A) Select (dot) Enabled or Not Configured, click/tap on OK, and go to step 7 below. (see screenshot below)

Not Configured is the default setting.


6 To Disable Networking in Windows Sandbox

A) Select (dot) Disabled, click/tap on OK, and go to step 7 below. (see screenshot below)

How to Enable or Disable Networking in Windows Sandbox in Windows 10-windows_sandbox_networking_gpedit-2.png


7 Close the Local Group Policy Editor.






OPTION TWO

Enable or Disable Networking in Windows Sandbox using a REG file


The downloadable .reg files below will add and modify the DWORD value in the registry key below.

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Sandbox

AllowNetworking DWORD

(delete) = Enable
0 = Disable


1 Do step 2 (enable) or step 3 (disable) below for what you would like to do.


2 To Enable Networking in Windows Sandbox

This is the default setting.

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Enable_networking_in_Windows_Sandbox.reg

Download


3 To Disable Networking in Windows Sandbox

A) Click/tap on the Download button below to download the file below, and go to step 4 below.

Disable_networking_in_Windows_Sandbox.reg

Download


4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 You could now delete the downloaded .reg file if you like.


That's it,
Shawn