docker - 在 Docker Swarm 上看不到 PiHole 客户端
问题描述
亲爱的
我在 Docker Swarm 上运行 PiHole,但我只看到 2 个客户端:10.0.0.3 和 localhost。如果我从网络上的各种讨论中正确理解,如果我以主机模式(pihole 被迫在单个 swarm 节点上运行)公开 DNS 端口,我应该能够看到 PiHole 中的所有客户端:
ports:
- published: 53
target: 53
protocol: tcp
mode: host
- published: 53
target: 53
protocol: udp
mode: host
- published: 67
target: 67
protocol: udp
mode: ingress
- published: 8053
target: 80
protocol: tcp
mode: ingress
不幸的是,如果我以这种方式暴露端口,dns 服务将不再工作:我可以看到容器上暴露的端口:
pi@raspy3:~ $ docker port 3be0321961a6
53/tcp -> 0.0.0.0:53
53/udp -> 0.0.0.0:53
但我无法通过 NETSTAT 看到它们:
pi@raspy3:~ $ netstat -atu | grep LISTEN
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
tcp6 0 0 [::]:8053 [::]:* LISTEN
tcp6 0 0 [::]:domain [::]:* LISTEN
tcp6 0 0 [::]:ssh [::]:* LISTEN
tcp6 0 0 [::]:https [::]:* LISTEN
tcp6 0 0 [::]:8000 [::]:* LISTEN
tcp6 0 0 [::]:9000 [::]:* LISTEN
tcp6 0 0 [::]:2377 [::]:* LISTEN
tcp6 0 0 [::]:7946 [::]:* LISTEN
tcp6 0 0 [::]:http [::]:* LISTEN
并且 nslookup 不起作用:
pi@raspy4:~ $ nslookup google.com 192.168.32.2
;; connection timed out; no servers could be reached
你能帮我理解我失去了什么吗?
谢谢 :)
解决方案
解决了将接口侦听行为更改为侦听所有接口,允许所有来源。
显然,一定要遵循 PiHole 团队的所有安全要点;)
推荐阅读
- uwp - 在 UWP 中:Contact.Phones 属性不返回 IList
如文档中所述 - c# - 如何在 Android 和 IOS 上创建目录?
- ios - 在 iOS 中快速更改像素的最佳方法
- python - 在 Django 中使用“_id”
- java - 当我包含共享首选项时,活动崩溃
- python - 如何使用 Conda 安装 Tensorflow 2.0?
- node.js - 为什么在这种情况下 MediaStream 对象是空的?
- rx-java2 - 如何使用 io.vertx.reactivex.ext.web.client.WebClient 的 rxSendStream 对字符串进行 Http POST
- c - 在C中逐个字符地将字符串的一部分复制到一个新的字符串中
- gradle - Groovy 编译失败,stackoverflow 无法重现