ok. first post after years of lurking. and even the title was a challenge in itself...
Prerequisite:
- Company A is providing services via a CDN like Cloudflare, Akamai, CloudFront, ...
Situation:
- (My) Client A is requesting information
- (My) DNS server (dnsmasq) sees the query and resolves an address that points to the CDN
- Client A is happily accessing CDN via https. Everything works.
My Challenge:
I would like to find out from what company my client is accessing a service from. (Company A in this example). Right now, the only nugget of information I have is the dns query and answer, ex:
query[A] e4478.a.akamaiedge.net from [IP_of_Client_A]
query[A] e673.dsce9.akamaiedge.net from [IP_of_Client_A]
query[A] e6858.dsce9.akamaiedge.net from [IP_of_Client_A]
What have I tried:
Apart from nslookup, dig (which I am not a hero of), nmap, netstat and a little tcpdump I've read every article on Superuser.com with "Akamai" in it and "researched" (duckduckgo'ed) a lot. Either my search parameters are wrong or this is a very basic question, alas no answers were found.
Almost There:
While doing that I came across robtex.com, where it is possible to enter the address ex. "e4478.a.akamaiedge.net" and it gives back all sorts of information.
Under the heading "Using as a CNAME" it resolves "e4478.a.akamaiedge.net" to "www.icloud.com.edgekey.net".
Now this helps me a long way! This is what I would love to get with a (combination of) un*xy shell commands, if at all possible.
Not every address is resolved to only one CNAME.
Ex. "e6858.dsce9.akamaiedge.net" is resolved to a list of "com-instantwinner.club, www.pboy.com, www.apple.com.edgekey.net.globalredir.akadns.net" but that is okay. At least I can narrow it down (if it isn't outright obvious like in this case).
I also came across this link Determining the service that is using *.CloudFront.net which looked promising, but basically says, there is no way to find out that information. Somehow Robtex does it, and I don't give up hope that there is a way to do so for me too.
Any advice?