Cannot ping github on Ubuntu1804 - suspect network configration issue

2.8k views Asked by At

I am trying to ping github.com on my ubuntu but seems like the IP address in ping is pointed to my local IP. Below is some information I dumped on my ubuntu , anyone can help to suggest which part is wrong on my net working configuration ?

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:~$ 
1

There are 1 answers

0
Jia On BEST ANSWER

Found the root cause . There is a manual entry in /etc/hosts , I comment it out , github.com can be accessed now .

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

comment out the line below everything works

# Github
#192.30.253.113 github.com