I am trying to connect from an application container to a database container in two situations, one succeeds, one doesn't.

There are two containers on my dockerhost: 

1. mysql container with port 3306 connected to 3356 on dockerhost
2. application container

At work, dockerhost has IP-address 10.0.2.15, at home, dockerhost has IP-address 192.168.8.11 (hostname -I).  

In both situations, I want to connect to the database container from the app container with host 10.0.2.15/192.168.8.11 and port 3356.

When I do this at work (Windows network, Vagrant/Virtualbox dockerhost), this is no problem. I can 'telnet 10.0.2.15 3356' from the app container and connect to the db container.
When I do this at home (Ubuntu), it is impossible to connect. The only way is to use the docker ip address of the db container (172.17.0.2) with port 3306. However, I can ping 192.168.8.11.

The scripts to start the containers are identical; I do not use --add-host, so the dockerhost IP-address is not in /etc/hosts.

Any suggestions?