I want to do a real time monitor of the DNS cache requests of the system in c#. My system is a windows 7 64 bit. What I did so far is to catch the DNS requests by creating a listening UDP server on port 53, but this monitors ALL the DNS request, what I am interested in are only request made to DNS cache of the local OS. Is there a way to monitor the DNS cache of the system? THx
Asked
Active
Viewed 784 times
1 Answers
0
You can get your DNS cache via this powershell function: Show-DnsServerCache
And this SO post illustrates how to call powershell functions from C#.
-
Yes, thx for the answer but it seems that it can be an option but only for Windows Server 2012 R2 and Windows 8.1. – Lucian Nov 20 '14 at 07:28