0

I'm trying to setup something similar to a CDN (Content Delivery Network) setup. What I want to do is use DNS records that return an A record based on where the user is geographically located. I was able to setup that using RAGE4 DNS. I can't really move the domain (lets call it domaina.com) to RAGE4 and I can only change the subdomain. So, what I've done is registered a new domain name (lets call it domainb.com) and have that setup on RAGE4 DNS with the geographic based A records and changed the subdomain (on domaina.com) to a CNAME which points to the RAGE4 DNS. This causes the A records returned by accessing the subdomain (on domainb.com) to only return the same IP address because its using the location of the nameserver for domaina.com (and not the original user who performed the query).

Maybe this is a better explanation:

  • User requests DNS record for xyz.domaina.com from ns1.domaina.com
  • xyz.domaina.com is a CNAME record which points to xyz.domainb.com
  • xyz.domainb.com returns an A record based on the geographic location of the user (in this case, it's the geographic location of ns1.domaina.com)

Are there anyways to get it to use the original users location instead of the name servers location?

1 Answers1

2

You can't.

There's an EDNS0 extension called "Client Subnet in DNS Requests", and it's already supported by some resolvers like Google Public DNS 8.8.8.8 and OpenDNS 208.67.222.222 (but not by Level3 4.2.2.1, Dyn 216.146.35.35, Hurricane Electric 74.82.42.42 or most other providers). Last time I checked, there was still pretty much no support for things like this in any publicly available open-source software, hence only Google and OpenDNS resolvers support it.

Some related question:

Some relevant troubleshooting answer:

In short, try running dig -t txt o-o.myaddr.l.google.com +short from a potential client of yours. If you aren't seeing edns0-client-subnet in the output, then all bets are off.

% dig -t txt o-o.myaddr.l.google.com +short
"188.40.25.3"

% dig @google-public-dns-a.google.com. -t txt o-o.myaddr.l.google.com +short "74.125.189.17" "edns0-client-subnet 88.198.54.0/24"

% dig @resolver1.opendns.com. -t txt o-o.myaddr.l.google.com +short "208.69.33.21" "edns0-client-subnet 88.198.54.0/24"

% dig @a.resolvers.level3.net. -t txt o-o.myaddr.l.google.com +short "8.0.18.147"

% dig @resolver1.dyndnsinternetguide.com. -t txt o-o.myaddr.l.google.com +short "91.198.22.152"

% dig @ordns.he.net -t txt o-o.myaddr.l.google.com +short "216.66.80.30"

%

cnst
  • 14,646