On the opendns.org website, their content changes based on if you are using their DNS servers or not. If you are not, then there is a callout to the user to change their DNS settings. If y开发者_高级运维our machine is setup to use their DNS servers then the callout is a link to manage your settings. How are they able to detect what the client's DNS servers are set to?
A method and a demo are currently available at https://gdns.re/edns-demo.
In my words:
- they host an authoritative DNS server
- they make your browser resolve a new unique domain name managed by their DNS server
- your recursive DNS server finds their DNS server, and they associate the requested domain name with the IP of your DNS server
- your browser connects to the resolved domain, and tells it the unique domain name in the Host header
- they retrieve the IP associated with the unique domain name, and respond appropriately
There isn't a way to find out the client's DNS server specifically. However, you do have the clients IP. With that you can check if it's in a database that you have - as Brian pointed out - and if it's not in there you could still resolve the IP to a host name and lookup what the name servers are for that domain. These are the two ways that it could be figured out - which is slightly different than positively detected.
精彩评论