0

Let's assume there is a web server, and a host name.

If someone wants to visit the web server, the browser will first send a DNS query for this host name.

If I hope all DNS query for this web server should be notified to the web server immediately(so the web server knows which IP did the query), is it possible or not?

for example, all DNS queries will be forwarded by DNS server to the web server host, and the DNS server on the host respond to the web browser directly. how about the delay?

or DNS server sends a notification packet to the web server immediately when it receives a DNS query for the web server. how about the delay?

2
  • This would be a very brittle solution. It's possible the DNS query was resolved by another DNS zone on another server owned by another company. . .
    – surfasb
    Commented May 28, 2013 at 0:57
  • It's also a terribly bad idea to begin with as it'd leave you wide open to a DoS attack. DNS queries are cheap compared to what this warning system would have to handle. Commented Sep 11, 2014 at 9:20

2 Answers 2

1

If someone wants to visit the web server, the browser will first send a DNS query for this host name.

Yes. To an entirely different server. I am not sure what you are assuming as a setup here, but if I want to visit your site foo.bar, I look it up with Google's DNS at 8.8.8.8 personally, and then I get your actual IP and end up at your site. The way you present your problem, you sound very confused and I'm not sure you understand how DNS works. Can you explain what you are trying to do and why you are asking this? That might give you a better answer.

3
  • I know what DNS is. I just hope DNS server can inform the web server who did the query.
    – misteryes
    Commented May 27, 2013 at 20:55
  • Of course it can, if you own it.
    – pzkpfw
    Commented May 28, 2013 at 7:16
  • @mistereyes I currently know of no DNS servers that do so and I really can't think of a single reason why anyone would consider this to be a remotely good idea. Commented Sep 11, 2014 at 8:59
0

To my knowledge, No.

DNS Server acts completely separately to the web server.

But the web server WILL know the client IP when the client PC/browser actually connects to the web server as the web server need to know where to send back the data/page that you requested.

6
  • DNS is separate from everything else. DNS is only for human readability, computers use IP addresses.
    – Keltari
    Commented May 27, 2013 at 20:16
  • I know what DNS is. I just hope DNS server can inform the web server who did the query.
    – misteryes
    Commented May 27, 2013 at 20:28
  • "DNS Server acts completely separately to the web server" -- this is irrelevant. As long as the DNS server knows who is asking to resolve, of course that server can share that information with the web server in some way. You just need to be in control of both of them, which is uncommon.
    – pzkpfw
    Commented May 28, 2013 at 7:17
  • for example, I don't let any DNS cache the IP of the web server. then all DNS queries have to go the the authorative DNS resolver of the web server, is it possible?
    – misteryes
    Commented May 28, 2013 at 9:53
  • I suppose as @bigbadonk420 mentioned, if you own the DNS server, and made a custom DNS code that will trigger a notification to the web server that some IP has just done a DNS query about the webserver, I guess that is possible. But again, why would the web server care? And then, you will also need a custom built web server that somehow understood the special notification that the DNS server sends to it. So yes, all in all, I guess I better change my answer to "Yes you can, with the assumption that you own both the DNS server, and web server, and write custom code to allow the transaction"
    – Darius
    Commented May 28, 2013 at 14:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .