Thursday, January 26, 2017

VPN blocking Docker routes on Windows Workaround

Here's the situation. You're stuck in 2017 running Windows 7 with a Cisco VPN client. You're also a Docker evangelist, and run local developer environments using Docker Toolbox on that Windows 7 laptop. Docker Toolbox runs the Docker daemon on a Virtual Box VM running the boot2docker Linux distribution. One of the cool tricks Docker Toolbox manages for you is it sets up a virtual network (VirtualBox host-only network), so the Boot2Docker VM has its own IP address (192.168.0.100 or whatever), and you alias that IP address in \Windows\System32\drivers\etc\hosts, so that you can connect to https://my.docker.vm/services, and everything is super cool - until you connect to that damn Cisco VPN, because the VPN is configured by some bonehead IT Windows group policy to hijack all routes to private network IP addresses, and somehow they wired it so that you can't "route add" new routes to your Docker VM.

Fortunately - there's an easy workaround to this mess. First, identify a block of public IP addresses that you know you don't need to communicate with (I chose the 55.0.0.0/8 block assigned to the DOD Network Information Center), and reconfigure the Virtual Box host-only network to assign addresses from that block rather than the default private network it was originally configured with (the Virtual Box GUI has a tool under File -> Preferences -> Network). I had to reboot to get the boot2docker VM to stick to the new IP address, and screw around with 'docker-machine regenerate-certs', but it eventually worked. Good luck!

7 comments:

mahnoorburi said...

I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article.WordPress Plugins

mahnoorburi said...
This comment has been removed by the author.
Dewa Poker said...

Bloghopping is really my forte and i like to visit blogs”    vpn

Best Stock broker said...
This comment has been removed by the author.
Best Stock broker said...

best stock broker in india

Simpati Pkr said...

Do you guys have a facebook or myspace fan webpage? I looked for for one on facebook or myspace but could not locate it, I’d love to become a fan! best vpns of 2020

Unknown said...

Awesome read. I especially liked the demo of protected content wrapping! I agree with you and i have the same dilemma, After reading your post i went back in and i set my discussion such that now all comments will need to be moderated.

Renew Norton Antivirus
is such a daunting task, That's why DG Cart brings Best Antivirus Software's from Different Brands and companies to secure your personal data.