大网数据广告活动
服务器运维问答

When using DNS from another continent, will IP's and CDN's reflect host country as well?

· 52CE 我爱测

Lets say I am using Russia’s Yandex DNS from Canada, or America. Will I be served IP's and CDN's that reflect the host country of said DNS? And will they tend to be nearer to that nation?

问题原文

原帖链接 · tutudid · CC BY-SA 4.0

Lets say I am using Russia’s Yandex DNS from Canada, or America.

Will I be served IP's and CDN's that reflect the host country of said DNS?

And will they tend to be nearer to that nation?

已采纳解答

原帖链接 · Stuggi · CC BY-SA 4.0

Most CDNs use Anycast instead of Unicast, which essentially make the IP that the DNS returns "present" all over the world at once, and your packets gets routed to the nearest node for that IP. This is for example what happens when you "hide" a webserver behind Cloudflare, they return an IP address for their CDN instead of the real IP of your server, and then proxy the traffic to your server.

So, to answer your question, if you browse any modern and large web application, you'll get served by the closest server to you, not your DNS-provider. Also, a DNS provider shouldn't modify the records they return, they should give you a cached copy of what they got the last time they queried the authoritative name server for that record. Anything else would be considered a man-in-the-middle attack. An exception to this is what OpenDNS does, if they can't reach the authoritative name server, they'll serve you with the newest expired record from their cache, thus prioritising availability before absolute accuracy.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-02-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。