gpt4 book ai didi

docker - 使用 Cisco VPN AnyConnect 时无法让 docker-machine 与 virtualbox 一起使用

转载 作者:IT老高 更新时间:2023-10-28 21:22:01 26 4
gpt4 key购买 nike

当我使用 Cisco VPN Anyconnect 加入我的公司网络时,我无法让 docker-machine 连接到我的 virtualbox 虚拟机。这与 Cisco Anyconnect 接管所有 192.168.. 路由有关。我还尝试使用完全不同的 cidr 范围(25.0.1.100/24),但仍然无法让 docker-machine 与 VM 对话。当我检查路由表时,路由被添加到 utun0 而不是 vboxnet0。我假设 utun0 是 VPN 的主机网络接口(interface)。这里是 docker-machine 输出:

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.x.x 上遇到了类似的 IP 冲突问题,我通过更改 VirtualBox 仅主机网络的子网解决了它。

1) 运行 docker-machine rm dev

2) 进入 VirtualBox 首选项并删除仅主机网络

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

关于docker - 使用 Cisco VPN AnyConnect 时无法让 docker-machine 与 virtualbox 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33992729/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com