moby / vpnkit

A toolkit for embedding VPN capabilities in your application
Apache License 2.0
1.1k stars 188 forks source link

Default subnet (192.168.65.0/24) may overlap with hosts network #427

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi,

when running vpnkit in Docker-for-Windows the adresses for the builtin DNS names are chosen from the 192.168.65.0/24 subnet.

As this may overlap with an existing network of the host, other targets within that IP range are not accessible from within the containers.

Is it maybe possible to make the builtin subnet configurable when running vpnkit through docker-for-windows? I know there is a cli option for that, but I am unable to expose this through e.g. dockers daemon.json.

Appreciate any help or tips on this.

Regards, Holger

djs55 commented 6 years ago

Hi Holger,

Thanks for your report. I compared the preferences dialogs of Docker Desktop on Mac and Windows and noticed that the subnet is configurable on Mac but not on Windows. This is an oversight so I've escalated it internally. I don't think there's an obvious workaround at the moment.

Thanks, Dave

djs55 commented 6 years ago

Hi again,

I've merged a fix into the development branch. Previously there were 2 distinct subnets:

  1. 10.0.75.0/24 for drive sharing: configurable
  2. 192.168.65.0/24 for internal networking: not configurable on Windows

I've changed the code so that both subnets are now derived from the user-configurable subnet in the UI. So if the UI says 192.168.65.0/24 then half of this subnet will be used for drive sharing and the other half will be used for internal networking. If the user changes this subnet then both the drive sharing and the internal networking will change too.

This fix should be in the next edge release -- I'll let you know when builds are available.

Thanks again for your report, Dave

ghost commented 5 years ago

Hi @dsheets, just wondering if you have any Idea when these changes will make their way into Docker-for-Windows ?