安装应用之后,容器内部无法访问外网 #4840
-
联系方式希望大佬们可以指导一下小弟,小弟将感激不敬! 1Panel 版本v1.10.6-lts 问题描述
重现步骤图形化界面安装, networks:
1panel-network:
external: true 进入容器内部 ping www.baidu.com 期待的正确结果ping www.baidu.com
PING www.baidu.com (198.18.0.28): 56 data bytes
64 bytes from 198.18.0.28: icmp_seq=0 ttl=64 time=0.192 ms
64 bytes from 198.18.0.28: icmp_seq=1 ttl=64 time=0.790 ms
64 bytes from 198.18.0.28: icmp_seq=2 ttl=64 time=0.784 ms
^C
--- www.baidu.com ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.192/0.589/0.790/0.280 ms 相关日志输出bash-5.1# ping www.baidu.com
ping: bad address 'www.baidu.com' 附加信息查看容器的内部的网络配置文件 cat resolv.conf
# Generated by Docker Engine.
# This file can be edited; Docker Engine will not make further changes once it
# has been modified.
nameserver 127.0.0.11
options timeout:2 attempts:3 rotate single-request-reopen ndots:0
# Based on host file: '/etc/resolv.conf' (internal resolver)
# ExtServers: [100.100.2.136 100.100.2.138]
# Overrides: []
# Option ndots from: internal 机器使用的是阿里云的,为了排除是阿里云的干扰,我已经开启所有端口的访问权限;并且物理机安装alist测试一切正常 |
Beta Was this translation helpful? Give feedback.
Answered by
wanghe-fit2cloud
May 3, 2024
Replies: 2 comments 2 replies
Answer selected by
huanglian666
-
打开了还是无法访问外网怎么办? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
查看一下容器 iptables 是否是开启状态,如图: