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

My problem was Cisco Anyconnect VPN interfered with internal docker networking

to fix this go to:
Cisco Anyconnect Settings > Preferences > check Allow local (LAN) access when using VPN

查看更多
放我归山
3楼-- · 2020-01-30 01:07

As stated in one other answer Docker doesn't play nice with a VPN. If you're using Nordvpn you have to disable "Invisibility on LAN" and probably "Internet Kill Switch".

If you've done so it should work even with the VPN active.

NordVPN Client

查看更多
冷血范
4楼-- · 2020-01-30 01:07

This (link below) seems to be the best fix i have found so far. It is persistant across reboots. It is best explained here: https://gist.github.com/biggyspender/8b5b2ed9ff63de31045d41304e3915b3

The vEthernet network interface seems to be dynamically created each time the system is started, and it is created in the 'Public' group as opposed to in the 'Private' group (where it works). The edits in one of the Docker startup scripts (called out in the link above) automate the powershell command / fix noted by David Tesar above....

I had more luck adding the function to the script as opposed to editing the script and changing 'Internal' to 'Private'.

查看更多
Root(大扎)
5楼-- · 2020-01-30 01:07

I tried everything listed here and on https://github.com/docker/for-win/issues/360

Nothing worked for me.

I run my dev environment on a docker container, and while on Corporate VPN (Cisco AnyConnect), I need the to mount my local drive on the container to access my project files.

Here's a docker hack that worked for me. Add --publish 8000:8000 to your existing docker run command.

So

docker run -v C:/Users/kumar.joshi/KumarData:/mnt --name dev <image:latest>

will become

docker run -v C:/Users/kumar.joshi/KumarData:/mnt --name dev --publish 8000:8000 <image:latest>

Make sure the port is not used else you will get this error:

Bind for 0.0.0.0:8000 failed: port is already allocated

查看更多
趁早两清
6楼-- · 2020-01-30 01:09

Seem like many having this issue when running Cisco AnyConnect. I got the same problem and here is how I solved:

The cause: The subnet being used by Docker is in the list of Secured Routes managed by Cisco AnyConnect (I believe this list is managed by your VPN's admin).

The solution: Change the subnet used by Docker to not overlap with the list being managed by AnyConnect.

For example, in my case, I changed from 10.0.75.0 (which was overlapped with 10.0.0.0/8) to 172.31.0.0/28. enter image description here

查看更多
Anthone
7楼-- · 2020-01-30 01:10

25 Jan 2020

It seems, it is an issue in the old versions, I installed the last version :

Docker version 19.03.5, build 633a0ea

and it worked for me without any configuration.

enter image description here

查看更多
登录 后发表回答