Code Monkey home page Code Monkey logo

Comments (2)

chaifeng avatar chaifeng commented on June 2, 2024

抱歉,几个月前非常忙,不知道是不是已经得到解决。或者,你可以用这个项目中的 Vagrantfile 来重现你的问题吗?这样我就可以用 vagrant up 启动虚拟机并登录进去以后就能看到你的问题了。

在当前的 Vagrant 虚拟机环境里,是能够验证容器之间是互通的。有另外一个 issue #105 遇到和你同样的问题,我目前感觉可能是因为防火墙中的其他规则阻止了容器间的访问。你可以修改 Vagrantfile 在大概108行那大段 shell 的最后来重现你的问题。

from ufw-docker.

yorunning avatar yorunning commented on June 2, 2024

应该是容器访问主机的映射端口被拦了,我的测试情况如下:

容器--容器 通过 172.17.0.x:port ok
容器--容器 通过 172.17.0.1:port(端口映射) 无法访问
容器--主机 通过 172.17.0.1:port(直接部署在主机上的服务) 无法访问
主机--容器 通过 172.17.0.x:port ok
主机--容器 通过 172.17.0.1:port(端口映射) ok

然后执行 ufw allow from 172.16.0.0/12 to 172.17.0.1 proto tcp后,容器到主机172.17.0.1可以正常访问。但是没搞懂172.17.0.1是包含在172.16.0.0/12这一段中,按理说应该不会存在这个问题的,希望作者大大能解答一下。

from ufw-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.