Why does my server ping zju.edu.cn prompt ping: zju.edu.cn: Name or service notknown gov.cn root domain name is the same. Whether the IP is blocked in China, but re turns normally after adding www. I changed servers many times and the problem still occurs. I tested both curl and dig. It should be a dns problem, but I added dns and it still didn’t solve the problem.
[root@centos-s-2vcpu-2gb-lon1-01 ~]# ping edu.cn
ping: edu.cn: Name or service not known
[root@centos-s-2vcpu-2gb-lon1-01 ~]# ping www.edu.cn
PING www.edu.cn (202.205.109.211) 56(84) bytes of data.
^C
--- www.edu.cn ping statistics ---
11 packets transmitted, 0 received, 100% packet loss, time 10260ms
[root@centos-s-2vcpu-2gb-lon1-01 ~]# ping gov.cn
ping: gov.cn: Name or service not known
[root@centos-s-2vcpu-2gb-lon1-01 ~]# ping www.gov.cn
PING zgovweb.v.bsgslb.cn (104.166.169.132) 56(84) bytes of data.
64 bytes from 104.166.169.132 (104.166.169.132): icmp_seq=1 ttl=50 time=51.2 ms
64 bytes from 104.166.169.132 (104.166.169.132): icmp_seq=2 ttl=51 time=32.9 ms
^C
--- zgovweb.v.bsgslb.cn ping statistics ---
3 packets transmitted, 2 received, 33.3333% packet loss, time 2003ms
rtt min/avg/max/mdev = 32.913/42.078/51.244/9.167 ms
[root@centos-s-2vcpu-2gb-lon1-01 ~]# cat /etc/resolv.conf
; Created by cloud-init on instance boot automatically, do not edit.
;
nameserver 8.8.8.8
nameserver 8.8.4.4
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya,
Based on the information you’ve provided, it seems like you are experiencing a DNS resolution issue. Here are a few points to consider:
DNS Resolution for Root Domains vs. Subdomains: The fact that
www.edu.cn
andwww.gov.cn
resolve correctly whileedu.cn
andgov.cn
do not could indicate that the root domains (edu.cn
andgov.cn
) don’t have DNSA
records associated with them. This is not unusual; some domains are configured to only respond to requests for specific subdomains (likewww
).DNS Configuration: You have Google’s DNS servers (
8.8.8.8
and8.8.4.4
) configured in your/etc/resolv.conf
. These are generally reliable, but there could be specific regional or network-related issues affecting their ability to resolve certain domains. You might want to try using different DNS servers (like Cloudflare’s1.1.1.1
, or a local DNS server) to see if that changes the behavior.Network Restrictions: Given that the domains in question are Chinese (.cn), there might be network-level restrictions or routing issues affecting DNS resolution, especially if your server is located outside of China. The Great Firewall of China is known for its strict internet censorship, which can impact how certain domains are resolved or accessed from different locations.
Ping vs. HTTP Requests: You mentioned using
curl
anddig
. Ifcurl
works for accessing these sites via HTTP/HTTPS butping
does not, it could be because ICMP (the protocol used byping
) is blocked or filtered either by your network, the destination server, or somewhere in between.Testing with
dig
: To further diagnose DNS issues, you can usedig
with different DNS servers to see how the resolution is handled. For example:This can help determine if the issue is with the DNS servers or with the domain itself.
In summary, it’s likely a DNS issue related to how the root domains are configured (not having
A
records) and potentially affected by regional network policies or restrictions. Using different DNS servers or querying specific subdomains (likewww
) that you know are configured correctly might help bypass these issues.