Home > other >  Docker container can't be outside network access.
Docker container can't be outside network access.

Time:10-03


1. I'm native Windows 7 and installed a vmware and vmware is centos6.5 system inside, docker1.7 launched a container,

2. Windows 7 host, and virtual machine firewalls are all closed,

3. Windows 7 host and vmware virtual machine of routing table below

Windows 7 the host routing table 3.1

One is me add a routing configuration:

The route to the add 172.17.0.0 mask 255.255.0.0 192.168.137.1 IF 19?



The virtual machine centos 3.2 (docker host host) routing configuration

The virtual machine routing I didn't change



4. Inside the docker container ping as follows

4.1 docker containers (172.17.0.1) ping www.baidu.com; Can



4.2 docker container ping Windows 7 host IP (192.168.0.100) can pass

?

4.3 the inside of the vmware centos docker host host ping docker container IP can



4.4 Windows 7 host ping docker docker0 Bridges can pass



4.5 Windows 7 host ping docker containers within the docker impassability, impassability, understand?



Under the great god answer, why the container can be accessed within the docker, outside the network; But why can't access the Intranet hosts docker inside the container?



CodePudding user response:

Windows 7 host IP case

Centos IP case

CodePudding user response:

Help tip, and is said to have been cut down docker0 Bridges, building a new, network set to bridge mode

CodePudding user response:

Principle of the deep understanding of computer network, docker0 default is Chinese card, that is to say the container in a network, a gateway is docker0, and why the container is access to the network routing, and your house, why do you use a router to access the network, external network can not access you, your host machine is equivalent to the gateway of the virtual machine

CodePudding user response:

And if you want to let the host access, just like you to create a virtual machine set up the network, you can use a docker network creation and Shared virtual machine host machine, the host network, or to do mapping,

Isolated isolation

CodePudding user response:

The building Lord what reason is this problem solved?

CodePudding user response:

Unable to post directly, only this way, please forgive me, ask a question, the three layers of network structure, a new colleague's computer to join the domain, normal access to the Internet for a period of time (hours), suddenly can't get to the Internet, IP, DNS and gateway works, could you tell me what causes? Never reset or add strategy, not modified routers, firewalls, domain and so on all parameters, other older employees to normal,
  • Related