You are not logged in.

#1 2025-04-28 14:49:58

sanne2
Member
Registered: 2024-06-05
Posts: 7

[SOLVED] can't resolve the github.com, always return 127.0.0.1

dig command show:

 $ dig github.com @8.8.8.8                                                        
; <<>> DiG 9.20.8 <<>> github.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11215
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		300	IN	A	127.0.0.1

;; Query time: 59 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Mon Apr 28 22:45:10 CST 2025
;; MSG SIZE  rcvd: 44

Last edited by sanne2 (2025-04-30 02:10:52)

Offline

#2 2025-04-28 15:01:14

sanne2
Member
Registered: 2024-06-05
Posts: 7

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

when i use +tcp,it‘s correct.

 $ dig +tcp github.com @8.8.8.8
; <<>> DiG 9.20.8 <<>> +tcp github.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14170
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;github.com.			IN	A

;; ANSWER SECTION:
github.com.		60	IN	A	20.205.243.166

;; Query time: 100 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (TCP)
;; WHEN: Mon Apr 28 22:58:59 CST 2025
;; MSG SIZE  rcvd: 55

and my phone can open github, same wifi
What should I do?

Last edited by sanne2 (2025-04-28 15:05:00)

Offline

#3 2025-04-28 15:11:11

-thc
Member
Registered: 2017-03-15
Posts: 863

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

Check the Arch installation as a source for this error.

Boot your system from a recent Arch install ISO and issue the dig command there.

Offline

#4 2025-04-28 15:58:35

sanne2
Member
Registered: 2024-06-05
Posts: 7

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

-thc wrote:

Check the Arch installation as a source for this error.

Boot your system from a recent Arch install ISO and issue the dig command there.


still encounter this issue in the live environment.

Last edited by sanne2 (2025-04-28 15:59:55)

Offline

#5 2025-04-28 16:49:19

-thc
Member
Registered: 2017-03-15
Posts: 863

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

If your next network hop is your WiFi/internet router - check it's configuration. This looks like a deliberate DNS filter (black hole).

Offline

#6 2025-04-29 04:52:33

sanne2
Member
Registered: 2024-06-05
Posts: 7

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

-thc wrote:

If your next network hop is your WiFi/internet router - check it's configuration. This looks like a deliberate DNS filter (black hole).

i check my wifi configuration,no dns filter,maybe it from my ISP?

Offline

#7 2025-04-29 07:04:52

seth
Member
Registered: 2012-09-03
Posts: 63,365

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

Have you tried other DNS, like 1.1.1.1, 9.9.9.9 - or the one likely provided by your ISP?
If your ISP ends up filtering port 53 traffic, see https://wiki.archlinux.org/title/DNS-over-HTTPS and change your ISP unless this is a government thing.

Edit: is this btw. limited to github?
Can you "dig @8.8.8.8 google.com" or "dig @8.8.8.8 4chan.org" (latter standing in for what a restrictive environment likely considers filth you're not supposed to see)

Last edited by seth (2025-04-29 07:06:31)

Offline

#8 2025-04-29 12:28:14

sanne2
Member
Registered: 2024-06-05
Posts: 7

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

seth wrote:

Have you tried other DNS, like 1.1.1.1, 9.9.9.9 - or the one likely provided by your ISP?
If your ISP ends up filtering port 53 traffic, see https://wiki.archlinux.org/title/DNS-over-HTTPS and change your ISP unless this is a government thing.

Edit: is this btw. limited to github?
Can you "dig @8.8.8.8 google.com" or "dig @8.8.8.8 4chan.org" (latter standing in for what a restrictive environment likely considers filth you're not supposed to see)

only github encounter this issue.
other dns server like 1.1.1.1 also not working

Offline

#9 2025-04-29 13:54:59

sanne2
Member
Registered: 2024-06-05
Posts: 7

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

this problem has been solved.
use doh.

Thank you everyone.

Last edited by sanne2 (2025-04-29 13:55:09)

Offline

#10 2025-04-29 15:13:16

seth
Member
Registered: 2012-09-03
Posts: 63,365

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Out of curiosity: https://en.wikipedia.org/wiki/Censorship_of_GitHub
Do you live in one of those less-than-properly-functioning countries?

Offline

#11 2025-04-30 02:13:40

sanne2
Member
Registered: 2024-06-05
Posts: 7

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

seth wrote:

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Out of curiosity: https://en.wikipedia.org/wiki/Censorship_of_GitHub
Do you live in one of those less-than-properly-functioning countries?

yeah, china.
but this is first time i face.

Offline

#12 2025-04-30 06:00:07

seth
Member
Registered: 2012-09-03
Posts: 63,365

Re: [SOLVED] can't resolve the github.com, always return 127.0.0.1

https://viewdns.info/chinesefirewall/?domain=4chan.org # lol memes
https://viewdns.info/chinesefirewall/?domain=google.com # google is evil, comes back as a fastweb server in italy?
https://viewdns.info/chinesefirewall/?domain=github.com # no results at all…

So it seems indeed china currently resolves github.com to the localhost?

Offline

Board footer

Powered by FluxBB