0

我正在尝试在我的 ubuntu 上 ping github.com,但似乎 ping 中的 IP 地址指向我的本地 IP。以下是我在我的 ubuntu 上转储的一些信息,任何人都可以帮助建议我的网络工作配置中哪个部分有问题?

jia@ub1804:~$ **ping github.com**
PING github.com (**192.30.253.113**) 56(84) bytes of data.
^C
--- github.com ping statistics ---
18 packets transmitted, 0 received, 100% packet loss, time 17413ms

jia@ub1804:~$ **nslookup github.com**
Server:     8.8.4.4
Address:    8.8.4.4#53

Non-authoritative answer:
Name:   github.com
Address: 192.30.255.112

jia@ub1804:~$ **sudo route -n**
[sudo] password for jia: 
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 cscotun0
0.0.0.0         192.168.1.1     0.0.0.0         UG    20600  0        0 wlp3s0
10.10.1.0       0.0.0.0         255.255.255.0   U     0      0        0 cscotun0
104.149.236.10  192.168.1.1     255.255.255.255 UGH   0      0        0 wlp3s0
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 cscotun0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp3s0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 cscotun0
192.168.1.0     0.0.0.0         255.255.255.0   U     600    0        0 wlp3s0
192.168.1.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlp3s0
jia@ub1804:~$ 
4

1 回答 1

0

找到了根本原因。/etc/hosts里面有手动入口,我注释掉,github.com现在可以访问了。

jia@ub1804:~$ cat /etc/hosts 127.0.0.1 localhost 127.0.1.1 ub1804

注释掉下面的行一切正常

# Github
#192.30.253.113 github.com
于 2020-07-18T03:39:44.280 回答