Docker Community Forums

Share and learn in the Docker community.

Connect to resource over VPN from windows container

I am trying to access resources over a corporate VPN from a windows container but cannot. When connected to the VPN, I can reach them just fine from the host (windows 10), but not from the container. It’s not just name resolution, I cannot access these resources by IP either.

Over the past week I’ve read all about different network types with regards to windows containers, but I cannot seem to create a network with any driver other than nat. It seems that l2bridge may be the appropriate choice as it spoofs the mac address of the host (if I’ve read that correctly) but whenever I try to create to create that network, I get:

PS C:\Windows\system32> docker network create -d l2bridge test --subnet 192.168.111.0/24 Error response from daemon: hnsCall failed in Win32: Element not found. (0x490)

Most of the documentation I’ve found on this network type looks to be from 2018 and potentially outdated? I have no idea - I’m completely new to docker.

So, my questions:

  1. Is a network with the l2bridge driver necessary to enable this communication over the VPN?

  2. Is there some other method to enable this communication? This seems to work OOTB with linux containers and the bridge network, but there appear to be more hoops with windows containers…

Thanks!

2 Likes