防火墙阻止的Windows文件共享上的Docker

Ami*_*pta 10 networking firewall hyper-v docker docker-for-windows

TL; DR

从VM上运行的docker容器我可以ping所有主机IP(例如10.10.10.1和172.24.185.209),但我无法ping 10.0.75.1.我的猜测是,一旦我弄清楚为什么我无法访问10.0.75.1网络适配器,共享问题将得到解决.


我已经阅读了这篇描述相同问题的帖子并尝试了各种建议而没有成功.我尝试过以下方法:

  1. 使用以下命令将Docker接口设置为私有:
    • Set-NetConnectionProfile -interfacealias"vEthernet(DockerNAT)" - NetworkCategory Private
  2. Telnet成功达到10.0.75.1 445
  3. 共享c驱动器并检查我是否可以从\ 10.0.75.1\c访问它
  4. 关闭"Domain","Public","Private"的防火墙
  5. 我试图为"vEthernet(DockerNAT)"卸载"Microsoft网络的文件和打印机共享"(按照某人的建议重新安装),但得到了错误:0x80071779
  6. 然后我取消选中"用于Microsoft网络的文件和打印机共享",为"vEthernet(DockerNAT)"单击"确定",然后重新打开它.
  7. 我已经重新安装了Docker for Windows几次

我使用以下内容:

  • Windows10版本1803(OS Build 17134.285)
  • Docker CE Version 18.06.1-ce-win73(19507),频道:稳定

更新时间:9/27/2018

我试图连接到虚拟机并四处寻找,但它不能 - 它一直说"视频远程连接断开".但是按照这个https://docker-saigon.github.io/post/Docker-Beta/#private-registries:ebf9573d6838c40027746e9d7482622a我在VM上运行了一个容器并通过它访问了VM.我正在使用以下内容运行容器,因此我可以完全访问来宾网络(--net = host)

docker run --net=host --ipc=host --uts=host --pid=host -it --security-opt=seccomp=unconfined --privileged --rm -v /:/host alpine /bin/sh
Run Code Online (Sandbox Code Playgroud)

我在主机上有以下适配器:

PS C:\WINDOWS\system32> ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : consilins2
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Ethernet 5:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : PANGP Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 02-50-41-00-00-01
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (Default Switch):

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
   Physical Address. . . . . . . . . : 2C-15-60-80-CD-1B
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Ethernet adapter vEthernet (Default Switch) 2:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
   Physical Address. . . . . . . . . : 02-15-9F-19-92-4C
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::1d6e:1706:ba33:33a8%31(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.24.185.209(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.240
   Default Gateway . . . . . . . . . :
   DHCPv6 IAID . . . . . . . . . . . : 520099165
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-97-33-8D-9C-B6-D0-EC-24-55
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Disabled

Ethernet adapter vEthernet (DockerNAT):

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
   Physical Address. . . . . . . . . : 00-15-5D-12-B3-04
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.0.75.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :
   DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
                                       fec0:0:0:ffff::2%1
                                       fec0:0:0:ffff::3%1
   NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Local Area Connection* 2:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter
   Physical Address. . . . . . . . . : 9E-B6-D0-EC-24-55
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 3:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2
   Physical Address. . . . . . . . . : AE-B6-D0-EC-24-55
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wi-Fi:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Killer Wireless-n/a/ac 1535 Wireless Network Adapter
   Physical Address. . . . . . . . . : 9C-B6-D0-EC-24-55
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::504d:580b:1452:d100%29(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.10.10.1(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Wednesday, September 26, 2018 4:35:28 PM
   Lease Expires . . . . . . . . . . : Friday, September 28, 2018 6:28:00 AM
   Default Gateway . . . . . . . . . : 10.10.10.254
   DHCP Server . . . . . . . . . . . : 10.10.10.254
   DHCPv6 IAID . . . . . . . . . . . : 127710928
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-97-33-8D-9C-B6-D0-EC-24-55
   DNS Servers . . . . . . . . . . . : 10.10.10.254
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
   Physical Address. . . . . . . . . : 9C-B6-D0-EC-24-56
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
PS C:\WINDOWS\system32>
Run Code Online (Sandbox Code Playgroud)

从docker容器中可以看到以下适配器:

docker0   Link encap:Ethernet  HWaddr 02:42:DE:73:21:B4
          inet addr:172.17.0.1  Bcast:172.17.255.255  Mask:255.255.0.0
          inet6 addr: fe80::42:deff:fe73:21b4/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:348 (348.0 B)

eth0      Link encap:Ethernet  HWaddr 02:50:00:00:00:01
          inet addr:192.168.65.3  Bcast:192.168.65.255  Mask:255.255.255.0
          inet6 addr: fe80::383b:a8ff:fe9f:2902/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1978 (1.9 KiB)

hvint0    Link encap:Ethernet  HWaddr 00:15:5D:12:B3:03
          inet addr:10.0.75.2  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::215:5dff:fe12:b303/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2896 errors:0 dropped:57 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:550086 (537.1 KiB)  TX bytes:3128 (3.0 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:34 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:3228 (3.1 KiB)  TX bytes:3228 (3.1 KiB)
Run Code Online (Sandbox Code Playgroud)

从VM上运行的docker容器我可以ping所有主机IP(例如10.10.10.1和172.24.185.209),但我无法ping 10.0.75.1.我的猜测是,一旦我弄清楚为什么我无法访问10.0.75.1网络适配器,共享问题将得到解决.

我希望这可能是一个更好定义的问题需要解决.再次,任何帮助将不胜感激.

谢谢,

阿米特

Ami*_*pta 2

长话短说

我相信正在运行的另一种防病毒软件导致了防火墙被阻止的问题


我决定从使用 Windows Defender 切换到 Norton Antivirus,看看是否可以解决该问题。当我尝试安装诺顿时,它抱怨无法删除以前安装的 AV 版本,并且安装中止。据我所知,我系统上唯一的反病毒软件是 Windows Defender。系统托盘中没有任何其他 AV 运行的证据。我检查了服务列表 - 我找到了诺顿的条目,但它没有运行。我不确定该条目之前是否存在,或者它是作为不成功安装的一部分创建的。不管怎样,我重新启动了计算机,并决定再次尝试共享驱动器,结果成功了。我能够 ping 10.0.75.1 并毫无问题地共享 C 驱动器。我最好的猜测是,可能有一个诺顿版本在后台运行,当我尝试全新安装并允许共享文件时,该版本被清理了。

我希望我能更好地了解确切的原因和修复方法,但它现在正在发挥作用。谢谢。