Docker Community Forums

Share and learn in the Docker community.

Windows container can't access networks visible from the host with VPN

Hi, for the life of me I can’t find a way of solving this. My setup:

Host: Windows 10 Professional, Docker 2.3.0.3 (45519).
Image: mcr.microsoft.com/windows:1903

My host computer is connected to a LAN (192.168.0.x), and I have a VPN configured to my office network (IP address is dynamic). I’ve got routes so from my host I can contact other computers in my office at the 192.168.110.x network. The VPN was configured using vanilla “Add a VPN Connection” from Windows.

When I start a container (e.g. with Powershell) it gets e.g. 172.31.27.236 and the default gateway is 172.31.16.1 (my host, obviously). I can connect to the Internet normally and even ping/connect other computers in the 192.168.0.x LAN. What I can’t do from the container is connect to any computer at my office (192.168.110.x). Running pings in parallel in my host and in my container show that the host is properly connected, but the container gets no response.

From Attempted address Packet is routed via Route succeeds
Host 192.168.110.1 VPN yes
Host 8.8.8.8 Ethernet yes
Host 192.168.0.30 (another computer in same LAN) Ethernet yes
Container 192.168.110.1 ? no
Container 8.8.8.8 Ethernet yes
Container 192.168.0.30 (another computer in same LAN) Ethernet yes

I can see the packets reach the “Hyper-V Virtual Ethernet Adapter” on the host using Wireshark, but somehow the packets intended for the VPN are not routed.

Note: the container is started with default options.

Question 1: is this scenario supposed to be supported?
Question 2: if yes… what might I be missing here?

Thanks in advance!

I’m having similar issues. From the container O can’t ping google for example. Did you manage to find a solution for this?