Docker Community Forums

Share and learn in the Docker community.

Docker Windows route form host to container fail

Hello,

i’ve installed docker version in Windows 10 :

Client:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 06:14:34 2016
OS/Arch: windows/amd64

Server:
Version: 1.12.5
API version: 1.24
Go version: go1.6.4
Git commit: 7392c3b
Built: Fri Dec 16 06:14:34 2016
OS/Arch: linux/amd64

I have a multiple containers that use port 80, for this reason, i create container but i don’t forward port to my host, the problem that im getting is that i cannot access from host to the container using the IP

The docker container have a 172.17.0.2, if i execute a tracert 172.17.0.2 i saw that the first step is the 192.168.0.1 (router IP) and that its wrong

The next step was check the route table :slight_smile:

PS C:\Users\snakepit> route PRINT

ILista de interfaces
19…00 15 5d 00 64 12 …Hyper-V Virtual Ethernet Adapter
12…c8 60 00 5a d9 57 …Realtek PCIe GBE Family Controller
1…Software Loopback Interface 1
7…00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
10…00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
18…00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2

IPv4 Tabla de enrutamiento

Rutas activas:
Destino de red Máscara de red Puerta de enlace Interfaz Métrica
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.100 25
127.0.0.0 255.0.0.0 En vínculo 127.0.0.1 331
127.0.0.1 255.255.255.255 En vínculo 127.0.0.1 331
127.255.255.255 255.255.255.255 En vínculo 127.0.0.1 331
172.17.0.1 255.255.255.255 En vínculo 172.17.0.1 271
192.168.0.0 255.255.255.0 En vínculo 192.168.0.100 281
192.168.0.100 255.255.255.255 En vínculo 192.168.0.100 281
192.168.0.255 255.255.255.255 En vínculo 192.168.0.100 281
224.0.0.0 240.0.0.0 En vínculo 127.0.0.1 331
224.0.0.0 240.0.0.0 En vínculo 192.168.0.100 281
224.0.0.0 240.0.0.0 En vínculo 172.17.0.1 271
255.255.255.255 255.255.255.255 En vínculo 127.0.0.1 331
255.255.255.255 255.255.255.255 En vínculo 192.168.0.100 281
255.255.255.255 255.255.255.255 En vínculo 172.17.0.1 271

There is some problem on create route table i think, because the route seems its created but still going to LAN interface

Can you post a set of commands that reproduce the problem?