Docker Cisco Anyconnect

If you are working with Cisco AnyConnect you will find that the normal docker address of will be blocked. This means that although you can start the docker server (docker-machine start), you won't be able to connect to it with the client (docker ps -a, for example), even when you've set the docker variables (docker-machine env).

I connect to the VPN using Cisco AnyConnect on ubuntu 18.04. The docker-compose file runs 2 services (redis and mysql), nothing locally built. It exposes the default ports for those services. I know that docker-compose creates a network when you 'up' it. It creates the network on the bridge interface. Using Docker on Windows with Cisco AnyConnect VPN in non-split tunnel mode - gist:d2eabbd402741ae728ef6ab2985dfddd. Fix network routing issues caused by Cisco AnyConnect with VirtualBox and boot2docker on Mac OS X - Echo ' Found docker interface at $(tput setaf 1. Docker adds an entry by default to the routing table, which forwards all traffic with destination 172.17.X.X through the loopback address. In your case, if the IP address assigned to your computer by AnyConnect begins with 172.17 the two subnets overlap and Docker freezes the vpn connection (you can check that by looking at your IP assigned by anyconnect and compare it with the routing table.

Work around

Change the docker server default IP address and use the open source open connect version

Change the Docker server default address

Edit C:Users<username>.dockermachinemachinesdefaultconfig.json and changing 'HostOnlyCIDR': ''.

You might optionally need to created a new HostOnly network adapter for the '' in the VirtualBox default machine. You can do this by copying and pasting the existing one, and changing 192.* to 10.*.

Try without first and see if it works.

Any running docker images (not the docker-machine itself) might need restarting after connecting to the VPN.

Use Open Connect

Download the windows version:

Start the GUI, add a new Profile, and enter your company VPN hostname for the hostname (no need to enter any protocol or ports), and enter your VPN username.

NOTE: Make sure the Batch mode is not selected otherwise it will try and connect multiple times without prompting (as it will assume the credentials are in a default location). This could block you out from your company VPN, needing them to reset the connection


Click 'Connect', and then enter your VPN password prefix + your Symantec 6 digit code from your app in the prompt and it should connect.

Boot2Docker is an OS X app used to create a virtual environment for docker. Docker only runs on Linux, so Boot2Docker installs a VM on your mac (using virtual box) and a client that runs locally to communicate with the VM.

I downloaded this and followed instructions. You basically just install it with a few clicks. Once installed, boot2docker will be in your application folder. You click on it and it in the applications folder and you are ready to go. It kicks off its own terminal window. Since I use iTerm2, I just start it like so:

boot2docker up

This will give you a few environment variables to export: