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:51

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)
查看更多
一夜七次
3楼-- · 2020-01-30 00:53

I found it quite easy. Just go to you network connections. You can go Control Panel/Network and Sharing. You will find various connections. Search for Docker connection. Select which ever is default. After selecting network, go to Properties. In the properties section enable the option Hyper-V Extensible Virtual Switch. This will help virtual container to use network card.

查看更多
狗以群分
4楼-- · 2020-01-30 00:54

Ok, so after running in the same issue, I have found a Solution.

This is what I did:


Step 1: Open ESET. Then click on Setup

click setup

Step 2: Click on Network protection

click network protection

Step 3: Click on Troubleshooting wizard

click troubleshooting wizard

Step 4: Find the Communication 10.0.75.2 (Default docker IP setting) Just check what the IP Range is defined inside your docker settings. Then look for for the IP which resides in that range.

find the connection

Step 5: Click on the Unblock button, then you should receive this screen.

click unblock

This solved the issue for myself.

You can then go to the Rules and check the rule that was added.


PS: This is my first post, sorry for any incorrect procedures.

查看更多
Summer. ? 凉城
5楼-- · 2020-01-30 00:54

Only this solution helps me:

  • Go to Hyper-V Manager -> Virtual Switch Manager -> DockerNAT -> Connection Type: change from internal to private, apply, change back to internal, apply
  • Restart MobyLinuxVM
  • Restart Docker
  • Set Docker network profile to 'Private'. Run command in PowerShell as admin
    Set-NetConnectionProfile -interfacealias "vEthernet (DockerNAT)" -NetworkCategory Private
  • Reset File and Printer Sharing for Microsoft Networks on DockerNAT connection
  • Go to Docker -> Settings -> Shared Drives and share C:
查看更多
▲ chillily
6楼-- · 2020-01-30 00:54

I had same issue with F-secure, DeepGuard was blocking the Docker service. My solution was:

Open F-secure client and click "Tasks"

enter image description here

Choose "Allow a program to start"

enter image description here

Choose from list "com.docker.service" and press "Remove"

enter image description here

After that restart Docker client and try to apply for file share.

Also very good troubleshoot guide here: Error: A firewall is blocking file sharing between Windows and the containers

查看更多
SAY GOODBYE
7楼-- · 2020-01-30 00:55

I was not using any third party firewalls when running into this error. I was convinced it was a Windows Firewall issue, though disabling Windows Firewall did not work for me. I finally found this blog post after much research: Docker on windows 10 error: A firewall is blocking file Sharing ...

It ended up NOT having to do with the built in Windows Firewall.

The Fix

  1. Uncheck File and Printer Sharing for Microsoft Networks from the vEthernet (DockerNAT) network adapter (you can find the connection in the Windows Network and Sharing Center).
  2. Recheck it and make sure it is enabled.
查看更多
登录 后发表回答