- Логи dns сервера windows
- Отладочное протоколирование и отслеживание активности DNS
- DNS Log Collection — Part 2
- DNS Log Collection — Part 2
- DNS Log Collection on Windows
- Windows DNS Log Sources
- Collecting DNS Query Logs from Sysmon
- Collecting from DNS ETW Providers
- Enhanced Windows DNS Event Log Logging
- Windows DNS Audit Events
- Windows DNS Analytical Events
- Active Directory and Native DNS Auditing
- Collecting File-based Microsoft DNS Debug Log Files
- Performance Considerations
- What can NXLog do?
- Conclusion
Логи dns сервера windows
To turn on DNS logging for a Microsoft Windows Server 2012 system which is functioning as a DNS server, take the following steps:
- Hit Ctrl-Esc.
- Click on Administrative Tools.
- Select DNS.
- Right-click on the DNS server and select Properties.
- Click on the Debug Logging tab.
If you wish to delete an existing log file that is in use and start a new one, right-click on the DNS server in the DNS Manager window, select All Tasks, then Stop. You can then move or delete the log file, right-click on the DNS server again, select All Tasks, then Start to restart logging.
When you check the log file, entries will appear such as the following:
The entries above show the system with IP address 192.168.0.42 queried the DNS server for the address of imap-mail.outlook.com. The Windows Server 2012 DNS server did not know the IP address, so it in turn queried a DNS forwarder system at 10.255.176.137. It received a response from the DNS forwarder and returned the response to the system at 192.168.0.42. The numbers you see for (9)imap-mail(7)outlook(3)com(0) reflect the number of characters in various parts of the address. E.g., imap-mail is 9 characters, outlook is 7 characters, and com is 3 characters.
A valuable and free tool which can aid you in examining Microsoft Windows DNS log files is Windows DNS Log Analyser.
If you wish to rotate the log file daily, you can use the instructions at Rotate the DNS server log file on a Windows server, though, since the at command is deprecated, you will need to use the schtasks command, instead of the at command. A command similar to the one shown below can be used to run the batch file at one minute after midnight every night:
I can check on the status of the avove scheduled task as shown below:
In the above example, the task was submitted on February 19, 2015.
Отладочное протоколирование и отслеживание активности DNS
Как правило, журнал событий DNS-сервер (DNS Server) используется для наблюдения за деятельностью DNS-сервера. В этом журнале записаны вес события DNS, а просмотреть его можно в узле Просмотр событий (Event View) консоли Управление компьютером (Computer Management). При поиске неисправностей DNS весьма полезной может оказаться настройка временного журнала для отслеживания определенных событий DNS. Не забывайте очищать события после окончания отладки.
Чтобы настроить отладку, выполните следующие действия:
1. В консоли Диспетчер DNS (DNS Manager) щелкните правой кнопкой нужный сервер и в контекстном меню выберите Свойства (Properties).
2. На вкладке Ведение журнала отладки (Debug Logging), установите флажок Записывать пакеты в журнал для отладки (Log Packets For Debugging). Затем установите флажки событий, временное наблюдение за которыми хотите вести.
3. В поле Имя и путь к файлу (File Path And Name) введите имя файла журнала, например, dns.log. По умолчанию журналы хранятся в папке %SystemRoot%\System32\Dns.
4. Щелкните ОК. Завершив отладку, отключите протоколирование, сбросив флажок Записывать пакеты в журнал для отладки (Log Packets For Debugging).
DNS Log Collection — Part 2
DNS Log Collection — Part 2
Be sure to read Part 1 and Part 3 of our DNS Log Collection series, in case you missed them.
DNS Log Collection on Windows
If you need to reduce the cost of DNS security and increase efficiency through centralizing DNS log collection, where would you start? Answering this question requires knowledge and awareness of the challenges and opportunities available on the Windows platform. While Windows DNS server is a common technology serving many types of organizations, from local domains to large multi-site enterprises, the possibilities are not necessarily that well-known within the context of comprehensive, site-wide log collection. This article distills the main concepts essential to planning and deploying such an implementation into this article, which serves as the second part of the DNS log collection series. To start, this article will touch on log sources that are generated by Windows DNS servers as well as the DNS requests of the clients they serve.
Windows DNS Log Sources
You may know that there are numerous ways of collecting DNS logs within the Windows environment:
Collecting DNS query logs via Sysmon
Collecting traces directly with Event Tracing for Windows (ETW) DNS Providers
Collecting from the relevant Windows Event Log channels
The deployment and resources to be used for DNS log collection will also depend on whether the logs will be collected from the DNS server (a critical asset) or from DNS clients. Each of these will be covered in further detail in this blog post.
Collecting DNS Query Logs from Sysmon
As of Sysmon version 10.0, there is a DNS Query logging feature to collect DNS query logs from clients. These events are generated when a process executes a DNS query, whether the result is successful or fails, cached or not.
Depending on how Sysmon is configured, you can also set additional rules in the configuration file for Sysmon in relation to Event ID 22: DNSEvent (DNS query). This is advisable due to the noisy nature of this type of event. These types of additions can be:
Exclusion rules to avoid logging reverse DNS lookups
Exclusion rules about which domains to exclude. If excluding certain top level domains (to reduce the amount of logs collected), be more specific with domains
Rules to exclude IPv6 lookups
Rules to omit domains typically used in sandboxes like localhost
Rules to omit queries involving popular third-party applications like Google, Mozilla, as well as CDNs
Rules to omit sites that involve social media widgets like Disqus
Rules to exclude ad serving sites and other ad-related services These are only suggestions for rules and are by all means non-exhaustive. There are Sysmon configuration samples available online for use and adaptation.
Since DNS queries generate a large amount of logs, you may opt to forward Sysmon DNS events in their own output stream to a central log server instead of merging them with other DNS client event sources.
Collecting from DNS ETW Providers
The DNS ETW providers with their corresponding GUIDs are displayed in the table below.
ETW Provider Name | GUID |
---|---|