无法访问 github.com

无法访问 github.com

今天遇到了一个非常奇怪的问题。

我有一台 Ubuntu Server 20.04,并且可以连接互联网。

curl -I https://ubuntu.com
HTTP/2 200
server: nginx/1.14.0 (Ubuntu)
date: Sat, 17 Oct 2020 21:36:00 GMT
content-type: text/html; charset=utf-8
content-length: 117744
vary: Accept-Encoding
strict-transport-security: max-age=15724800
cache-control: max-age=61, stale-while-revalidate=90
x-view-name: canonicalwebteam.templatefinder.templatefinder.template_finder
x-vcs-revision: 1602851262-3ba0a85
x-request-id: 6375631a0ecfec34db764bd1749c47f0
link: <https://assets.ubuntu.com>; rel=preconnect; crossorigin, <https://assets.ubuntu.com>; rel=preconnect, <https://res.cloudinary.com>; rel=preconnect
x-cache-status: HIT from content-cache-gs2/1
accept-ranges: bytes

当我尝试连接到 github.com 时没有任何反应。

curl -I https://github.com
curl: (28) Failed to connect to github.com port 443: Connection timed out

wget、lynx 有同样的问题。

但是我可以 ping github.com

ping github.com
PING github.com (140.82.121.3) 56(84) bytes of data.
64 bytes from lb-140-82-121-3-fra.github.com (140.82.121.3): icmp_seq=1 ttl=50 time=21.9 ms

或者跟踪路由

traceroute github.com
traceroute to github.com (140.82.121.4), 30 hops max, 60 byte packets
 1  router.xxxxx.xxx (xx.xx.xx.xx)  0.242 ms  0.238 ms  0.255 ms
 2  81-223-31-89.static.upcbusiness.at (81.223.31.89)  2.113 ms  3.889 ms  4.722 ms
 3  * * *
 4  80-241-21-149.static.upcbusiness.at (80.241.21.149)  18.085 ms  18.261 ms  22.063 ms
 5  at-vie05d-rc1-ae-31-2048.aorta.net (84.116.228.149)  19.252 ms  22.501 ms  23.460 ms
 6  at-vie05b-ri3-ae-12-0.aorta.net (213.46.173.125)  21.620 ms  9.418 ms  13.507 ms
 7  ae6.cr1-vie2.ip4.gtt.net (46.33.84.85)  15.221 ms  16.084 ms  16.096 ms
 8  et-2-0-13.cr2-fra6.ip4.gtt.net (89.149.185.22)  29.695 ms  25.821 ms  29.583 ms
 9  87.119.94.70 (87.119.94.70)  34.992 ms  29.015 ms  28.827 ms
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

有人知道哪里出了问题吗?

答案1

我找到原因了。原因是 IP 地址重复。一旦我更改了 IP 地址,一切就都正常了。

相关内容