Github 被 DNS 投毒

2018-07-24 21:21:55 +08:00
 Mohanson

(楼主杭州)今天发现 Git 无法同步项目, 简单测试后发现 Google DNS, 114 DNS, OpenDNS 等国内知名公共 DNS 返回的结果均指向多个不存在的 IPv4 地址(不存在指的无论国内国外均无法连接该地址). 换用 1.1.1.1 和阿里 DNS 后吐回正常结果. 114 DNS 测试结果如下:

[root ~]# nslookup github.com 114.114.115.115 Server: 114.114.115.115 Address: 114.114.115.115#53

Non-authoritative answer: Name: github.com Address: 13.250.177.223 Name: github.com Address: 52.74.223.119 Name: github.com Address: 13.229.188.59

[root ~]# [root ~]# ping 13.250.177.223 PING 13.250.177.223 (13.250.177.223) 56(84) bytes of data. ^C --- 13.250.177.223 ping statistics --- 6 packets transmitted, 0 received, 100% packet loss, time 4999ms

凉凉.

5774 次点击
所在节点    程序员
27 条回复
cydian
2018-07-24 21:26:33 +08:00
是否存在本地劫持?抢先的权威应答?
ysc3839
2018-07-24 21:28:30 +08:00
禁 ping 了解一下,不要看到无法 ping 就说无法连接。你需要用 curl 测试能否正常相应。
ysc3839
2018-07-24 21:29:53 +08:00
我这里的 curl 结果。
$ curl -v https://13.250.177.223
* Rebuilt URL to: https://13.250.177.223/
* Trying 13.250.177.223...
* Connected to 13.250.177.223 (13.250.177.223) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_128_GCM_SHA256
* server certificate verification OK
* server certificate status verification SKIPPED
* SSL: certificate subject name (github.com) does not match target host name '13.250.177.223'
* Closing connection 0
curl: (51) SSL: certificate subject name (github.com) does not match target host name '13.250.177.223'
blankme
2018-07-24 21:30:43 +08:00
/go/monthly

这三个 ip 都是 github 的,不信你自己访问看看,出现 ssl 警告直接忽略。
Mohanson
2018-07-24 21:31:41 +08:00
@ysc3839 这种低级问题就不用特意说明了吧... icmp 协议我都手撸过
ysc3839
2018-07-24 21:32:35 +08:00
@Mohanson 你自己都知道,那为何还说无法连接?
f2f2f
2018-07-24 21:34:31 +08:00
13.229.188.59 是 Akamai 高防 cdn IP,你的测试手段比人家高防还厉害👍
Mohanson
2018-07-24 21:41:41 +08:00
@ysc3839 @f2f2f 既然你们确定这是 github 地址, 这么棒的话, 倒是给我连上去啊, curl 一个我就闭嘴, 扯什么扯.
Mohanson
2018-07-24 21:42:22 +08:00
v2ex 有老贴: https://www.v2ex.com/t/439103, 和我同样的问题.
lisonfan
2018-07-24 21:45:40 +08:00
1、上 v2 的程序员有几个是直连 Github 的?
2、http://www.17ce.com/site/dns/20180724_6d5b4c708f4711e8b934bd71d877d311:1.html
blankme
2018-07-24 21:47:29 +08:00
@Mohanson
你在 v 站能搜到一大把这种帖子,都是 ping 一下不通就变成被墙了。
github 用的 aws 的服务器本来就是禁 icmp 的。
你给的 3 个 ip 都能用来访问 github,不是你上不了就全世界都上不了。
LanFomalhaut
2018-07-24 21:49:19 +08:00
然而并不是 DNS 投毒
Raymon111111
2018-07-24 21:50:27 +08:00
国外网站统一翻着上
ysc3839
2018-07-24 21:53:10 +08:00
@Mohanson
V2EX 提示“请不要在每一个回复中都包括外链,这看起来像是在 spamming ”,所以我放到了外部网站
https://paste.ubuntu.com/p/Hf9VxXRdJC/
Mohanson
2018-07-24 21:56:05 +08:00
@blankme 按照你这么说, 因为 github 挂在 aws 上所以没有人能 ping 通 github 了. 要不要你现在试着 ping 一下.
riggzh
2018-07-24 21:56:53 +08:00
NAPATA
2018-07-24 21:57:55 +08:00
杭州电信这几天确实很不稳的
Mohanson
2018-07-24 22:00:16 +08:00
@ysc3839 感谢你的回复, 我失态了向你道歉. 确实如你所说, 详细测试后我发现我到 13.250.177.223 的连接是被限速到极低, 不超过 512 byte/s 的样子, 所以导致 git pull 几乎没有响应. 总之感谢你的详细回复.
Tianao
2018-07-24 22:01:59 +08:00
@Mohanson 我这里电信家宽裸连,也是浏览器访问正常、CURL 正常、ping 超时。
Mohanson
2018-07-24 22:02:14 +08:00
@ysc3839 并且因此 curl 几乎没有响应, 等的时间长一点还是会有反应的..

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/473823

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX