Settings to Windows Firewall to allow Docker for W

2020-01-30 00:35发布

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?

30条回答
乱世女痞
2楼-- · 2020-01-30 01:12

Using Kaspersky Internet Security you can resolve this easily if you change the vEthernet (DockerNAT) network adapter type to Trusted network.

Settings > Protection > Firewall > Networks > vEthernet (DockerNAT) > Select "Trusted Network"

enter image description here enter image description here enter image description here enter image description here

查看更多
等我变得足够好
3楼-- · 2020-01-30 01:13

For Windows 10 machines on domain networks, when creating the Hyper-V virtual Ethernet adapter, it gets categorized as a public network. You have to change it to a private network to allow the more relaxed Windows Firewall rules, and therefore allow file sharing.

Run the following command in PowerShell:

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

Change the name in quotes if your machine's virtual Hyper-V network connection is called something else.

查看更多
叛逆
4楼-- · 2020-01-30 01:16

For AVG Internet Security, enabling Internet Connection Sharing Mode under the Firewall settings did the trick for me.

enter image description here

查看更多
做个烂人
5楼-- · 2020-01-30 01:17

Even after ensuring that the inbound firewall rule is set up properly and even after uninstalling and reinstalling the File and Printing Sharing Service it didn't work for me.

Solution: on top of that I also had to do a third thing. I had to deactivate the checkbox Prevent incoming connections when on a public network in the specific firewall settings for public networks. After doing that it started working for me as well. See screenshots attached at the end of this message.

Don't know how long this option has been there already. I'm currently working on Win 10 Pro 1709 16299.402.


1. Open specific firewall settings for public networks Open specific firewall settings for public networks

2. Uncheck this checkbox Uncheck this checkbox

查看更多
We Are One
6楼-- · 2020-01-30 01:17

for those who can not solve this issue by any means, you can try this: manually map drive into the docker host:

https://github.com/docker/for-win/issues/466#issuecomment-416682825

The research is here: https://github.com/docker/for-win/issues/466#issuecomment-398305463

查看更多
Deceive 欺骗
7楼-- · 2020-01-30 01:18

That depends on what firewall do you have installed. In my case I do have disabled the built-in Windows Firewall and I am using ESET Smart Security so my rules looks like:

  • Create a rule for IN connection since you should allow Docker to connect to your host and set it to Allow

enter image description here

  • Setup the port properly as explained in docs meaning 445:

enter image description here

  • Setup the remote IP address:

enter image description here

Maybe this is not the answer since it's not related to Windows Firewall but could give you a clue in what to do.

查看更多
登录 后发表回答