使用Cisco VPN AnyConnect时,无法使Docker计算机使用virtualbox

当我使用Cisco VPN Anyconnectjoin到我的公司networking时,我无法使docker机连接到我的virtualbox VM。 它与Cisco Anyconnect接pipe所有192.168有关。 路线。 我也尝试过使用完全不同的cidr范围(25.0.1.100/24),但仍然无法让docker-machine与VM交谈。 当我检查路由表时,路由被添加到utun0而不是vboxnet0。 我假设utun0是VPN的主机networking接口。 这里的docker机输出:

docker-machine create -d virtualbox dev Running pre-create checks... Creating machine... Waiting for machine to be running, this may take a few minutes... Machine is running, waiting for SSH to be available... Detecting operating system of created instance... Provisioning created instance... Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... WARNING >>> This machine has been allocated an IP address, but Docker Machine could not reach it successfully. SSH for the machine should still work, but connecting to exposed ports, such as the Docker daemon port (usually <ip>:2376), may not work properly. You may need to add the route manually, or use another related workaround. This could be due to a VPN, proxy, or host file configuration issue. You also might want to clear any VirtualBox host only interfaces you are not using. To see how to connect Docker to this machine, run: docker-machine env dev 

我有一个192.168.xx IP冲突类似的问题我解决了它改变VirtualBox主机专用networking的子网。

1)运行docker-machine rm dev

2)进入VirtualBox首选项并删除主机专用networking

3)运行docker-machine create --driver virtualbox --virtualbox-hostonly-cidr "25.0.1.100/24" dev

这里也有关于Github的讨论: https : //github.com/docker/kitematic/issues/1029#issuecomment-156219462

我有同样的问题, 这个post在github.com上的docker解决了。

 sudo ifconfig vboxnet0 down && sudo ifconfig vboxnet0 up 

您也可以使用这里讨论的端口2377

如果您可以select在分离隧道 (而不是全隧道)模式下运行Cisco VPN,那么似乎可以正常工作,同时仍允许您访问公司networking。