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

后端 未结 30 1406
臣服心动
臣服心动 2020-12-07 07:11

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

相关标签:
30条回答
  • 2020-12-07 08:07

    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

    2. Uncheck this checkbox

    0 讨论(0)
  • 2020-12-07 08:08

    My C 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.

    Looking through the above solutions, I found something that worked for me that is simpler than anything else I saw on this page. In Control Panel\All Control Panel Items\Network and Sharing Center, on the vEthernet (DockerNAT) connection, I unchecked the property File and Printer Sharing for Microsoft Networks and saved the setting. Then I checked the property again to reenable it and saved it again.

    At this point, I was able to reshare the C drive in Docker settings. I have no idea why this worked but it was not a firewall problem, which already have an entry for DockerSmbMount.

    0 讨论(0)
  • 2020-12-07 08:08

    What did it for me (after several hours of trial-n-error) was changing the Subnet Mask from 255.255.255.240 to 255.255.255.0 (which should not change anything).

    As part of the trial-n-error, I had done everything else listed on article, but without any success .. but this last step did it .. and reverting back to 255.255.255.240 does not break the good cycle.

    I admit, it makes no sense .. but it might be related to an internal state only being triggered by the network change.

    Anyway, if i have helped just one, then it was worth the effort.

    Docker Desktop edge, 2.0.4.1 (34207)
    
    0 讨论(0)
  • 2020-12-07 08:09

    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

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

    • Setup the remote IP address:

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

    0 讨论(0)
  • 2020-12-07 08:09

    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.

    0 讨论(0)
  • 2020-12-07 08:11

    My solution was to disconnect from the VPN; that was causing the issue

    0 讨论(0)
提交回复
热议问题