Replies: 2 comments
-
太长没看,不过粗略看一眼应该是macvlan,你可以搜一下,docker的macvlan默认是无法与宿主机互通的。 |
Beta Was this translation helpful? Give feedback.
-
这个宿主机与本机的docker paopaodns 不通的问题已经找到了解决方案,而且操作比较简单。
注意,因为这个例子里宿主机和docker容器在同一个192.168.1.x ip段,所以新的虚拟网卡macvlan0-host不需要设置ip, 三步操作完成后,可以宿主机和容器互ping来测试, |
Beta Was this translation helpful? Give feedback.
-
当前网络环境是ROS主路由,ROS内安装了一个paopaodns,custom forward到下方的singbox 192.168.50.33:53
局域网内有一台Debian,运行着singbox,ip 192.168.50.33,
这样可以正常工作。
现在想在上述Debian内再安装一个备用的paopaodns,macvlan 虚拟了ip 192.168.50.13,custom forward到上述singbox 192.168.50.33:53,用docker compose安装成功。此时这台Debian内有192.168.50.33的singbox和192.168.50.13 的paopaodns同时存在,此时这个paopaodns通不过test.sh。
一开始我以为是53端口冲突,于是把singbox的listen 53改成了5353,ROS内的paopaodns和Debian的新装paopaodns都改成了forward 192.168.50.33:5353,但仍然是ROS内的paopaodns正常工作,而Debian内的新装paopaodns无法通过test。
此时是肯定没有端口冲突的,信息如下,Debian的53端口未被占用,使用的是5353
test.sh主要报错有两处,一处是hijack
[TEST] HIJACK
;; communications error to 9.8.7.5#53: timed out
;; no servers could be reached
;; communications error to 9.8.7.6#53: timed out
;; no servers could be reached
HIJACK 127.0.0.1 = 58.xxx.xxx.xxx (#此处ip打码)
另一处是socks5 和 custom forward测试:
DNSCRYPT-SOCKS5 NOCN:
;; communications error to 127.0.0.1#5303: connection refused
;; no servers could be reached
CUSTOM_FORWARD TEST [youtube]:
;; communications error to 192.168.50.33#5353: timed out
;; communications error to 192.168.50.33#5353: timed out
;; communications error to 192.168.50.33#5353: timed out
;; no servers could be reached
CUSTOM_FORWARD TEST [taobao]:
;; communications error to 192.168.50.33#5353: timed out
;; communications error to 192.168.50.33#5353: timed out
;; communications error to 192.168.50.33#5353: timed out
;; no servers could be reached
另外有个情况是局域网内其他设备无法ping通Debian新装的paopaodns 192.168.50.13,即使是其宿主机Debian,也无法ping通192.168.50.13,但是ROS主路由可以ping通这个paopaodns 192.168.50.13
不知是否docker compose生成的虚拟ip桥接没做好导致这个故障发生?请各位帮忙分析分析,谢谢。
compose内容如下:
services:
paopaodns:
image: sliamb/paopaodns:latest
container_name: paopaodns
networks:
macvlan:
ipv4_address: 192.168.50.13
volumes:
- /root/paopaodns/mydata:/data
privileged: true
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- UPDATE=weekly
- CNAUTO=yes
- CNFALL=yes
- CN_TRACKER=yes
- IPV6=yes
- CUSTOM_FORWARD=192.168.50.33:5353
- AUTO_FORWARD=yes
- AUTO_FORWARD_CHECK=yes
- USE_MARK_DATA=yes
- ADDINFO=yes
- SHUFFLE=yes
- RULES_TTL=604800
#paopaodns server ip
- SERVER_IP=192.168.50.13
- HTTP_FILE=yes
ports:
- "53:53/tcp"
- "53:53/udp"
- "5304:5304/tcp"
- "5304:5304/udp"
- "7889:7889/tcp"
networks:
macvlan:
driver: macvlan
driver_opts:
parent: eth0
macvlan_mode: bridge
ipam:
config:
- subnet: 192.168.50.0/24
gateway: 192.168.50.1
Beta Was this translation helpful? Give feedback.
All reactions