Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker for Windows with Windows Containers not working when connected to VPN

I am playing around with Docker Desktop for Windows. I am using Windows Containers to run ASP.NET Framework 4.7.2 application. I am able to create a sample application and host it in a docker container and also debug the application using visual studio. However when I connect to my corporate VPN using Cisco AnyConnect, the docker container is no longer accessible. My debug session from VS also disconnects. Is there anything that I can do to get it to work when VPN is connected as I need it to connect back to a SQL Server in the corp network. I tried VPN Bypass by mapping a local port but that does not work as well.

Docker Desktop: 2.3.0.2(45183) OS: Windows 10 Application: .NET Framework 4.2.7 Image: microsoft/aspnet:4.7.2-windowsservercore-1803 VS: 2017

Thanks Sanjeev.

like image 501
sanjeev nachimuthu Avatar asked Oct 25 '25 07:10

sanjeev nachimuthu


1 Answers

Ok, this seems to be a problem with 2 things.

  1. The VPN configuration. When VPN is enabled all local networking is disabled. So if I ping the IP of the container, its routed to the corp network via the VPN and cannot identify the IP. So this fails. The only way is to enable local networking, but corp will not do this.

  2. This issue is not there when using Linux containers. Docker have a VPNKit which takes care of this. However the NAT that docker windows uses cannot bypass the specific configuration in 1.

It may not be a solution, but might be helpful to anyone having the same problem.

like image 154
sanjeev nachimuthu Avatar answered Oct 26 '25 21:10

sanjeev nachimuthu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!