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 00:55

I had this problem with Kaspersky; turning off Kaspersky worked, so I knew it was the firewall. In my case, Kaspersky was already blocking port 445 for some reason. I had to go to Packet Rules for the Firewall, Local Services (TCP) and remove 445 from the list of blocks ports.

Image 1

Image 2

查看更多
欢心
3楼-- · 2020-01-30 00:55

My G drive stopped being shared with Docker after a recent Windows 10 update. I was getting the same problem saying it was blocked by the Windows firewall when attempting to reshare it.

Then I had tried to solve this issues by couple of suggestion but i cant resolve that issue after that I have tried to Reset credentials below of Shared Drives and my issue was solved.

So If you want then you can try to do this-

enter image description here

查看更多
可以哭但决不认输i
4楼-- · 2020-01-30 00:56

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
查看更多
祖国的老花朵
5楼-- · 2020-01-30 00:56

Everything everyone posted DID NOT WORK for me.

THIS DID.

I installed the EDGE release. I then went to WINDOWS DEFENDER and disabled the firewall for DOCKER NAT. (not my actual ethernet adapter, just the docker nat)

Once I disabled windows defender/firewall THAT way it worked fine.

ugh. really hopes that helps some of you!

查看更多
仙女界的扛把子
6楼-- · 2020-01-30 00:57

I had the same problem with firewall not allowing me to share my C drive. I tried all listed above solutions and nothing worked for me. Then I uninstalled docker completely from my machine Control Panel\Programs\Programs and Features -> select Docker for Windows -> Uninstall
Then go to docker website and click Get Docker for Windows (Stable)
After that I was able to share drive C

查看更多
劫难
7楼-- · 2020-01-30 01:01

If non of the above works, just make sure you're not connected to a VPN. That's exactly what happened to me, i was connected to a VPN using Cisco AnyConnect client, also make sure you set an static DNS in the docker settings.

查看更多
登录 后发表回答