Settings to Windows Firewall to allow Docker for Windows to share drive

Ribeye picture Ribeye · Feb 13, 2017 · Viewed 146.6k times · Source

Windows Firewall is blocking my attempt to allows Docker for Windows to share C: on windows 10 machine.

Works fine when Windows Firewall off. When its on I get

A firewall is blocking file Sharing between Windows and the containers. See documentation for more info.

The documentation says

You do not need to open port 445 on any other network. By default, allow connections to 10.0.75.1 port 445 (the Windows host) from 10.0.75.2 (the virtual machine).

I am "googled out" on trying to find how to do that - can someone advise?

Answer

David Tesar picture David Tesar · May 11, 2017

You don't actually need to share the C drive but only reinstall (or potentially even uncheck - click OK - then check) the File and Print sharing service on the Hyper-V virtual network card. See this article.

Also if there are restrictions on your network profiles (i.e. public), consider changing the default "unidentified network" for the "vEthernet (DockerNAT)" card to private via this PowerShell command before doing the above:

Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private