- 主题:阿里云上申请的机器,没有公网ipv4的,但是
你 curl 用的 IPv6 是因为你系统 DNS 默认解析的是 IPv6 地址
这个提示说的就是机器本身没有 IPv6
如果你正常用 v4 就能访问外网了,不需要买公网 IP
【 在 loser002 (~金字塔底层蝼蚁~) 的大作中提到: 】
: 这是我默认购买的美国区机器,没有买外网ip,为什么不能访问外网呢?难道阿里没有统一出口吗,必须要买弹性公网ip吗?神奇的是,我curl,它居然用的是ipv6,ipv6是默认的开通的吗?如果有了ipv6为什么不能对外访问呢?这个ipv6也不是公网ipv6,难道我要手工分配一个公网
: Last login: Sat Aug 28 12:22:44 2021 from 100.104.237.252
: Welcome to Alibaba Cloud Elastic Compute Service !
: ...................
--
FROM 114.242.94.*
/etc/gai.conf
# precedence <mask> <value>
# Add another rule to the RFC 3484 precedence table. See section 2.1
# and 10.3 in RFC 3484. The default is:
#
#precedence ::1/128 50
#precedence ::/0 40
#precedence 2002::/16 30
#precedence ::/96 20
#precedence ::ffff:0:0/96 10
#
# For sites which prefer IPv4 connections change the last line to
#
#precedence ::ffff:0:0/96 100
【 在 loser002 (~金字塔底层蝼蚁~) 的大作中提到: 】
: 怎么把dns默认解析改成ipv4呢?
--
FROM 114.242.94.*
哦,你是 redhat 系,我不会这玩意
【 在 loser002 (~金字塔底层蝼蚁~) 的大作中提到: 】
: 我的机器没有这个文件
: [root@aaaaa1 ~]# cat /etc/gai.conf
: cat: /etc/gai.conf: No such file or directory
: ...................
--
FROM 114.242.94.*
curl -4
【 在 loser002 (~金字塔底层蝼蚁~) 的大作中提到: 】
: ifconfig也没发现ipv6地址。。。
: 但是curl就是不行,不会是防火墙的问题吧
: [root@aaaaa1 ~]# ifconfig
: ...................
--
FROM 114.242.94.*