AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 926513
Accepted
Greg Esposito
Greg Esposito
Asked: 2018-08-16 05:38:03 +0800 CST2018-08-16 05:38:03 +0800 CST 2018-08-16 05:38:03 +0800 CST

即使禁用了 AD 日志查询的 DNS 服务器

  • 772

我有两个运行 DNS 的 Server 2012 R2 DC。

DNS 服务器在 GUI 中关闭了调试日志,但是我每天收到 500MBdns#TIMESTAMP#.log的文件C:\Windows\System32\DNS\Logs\

我运行了 PowerShellget-dnsserverdiagnostics

SaveLogsToPersistentStorage          : True
Queries                              : False
Answers                              : False
Notifications                        : False
Update                               : False
QuestionTransactions                 : False
UnmatchedResponse                    : False
SendPackets                          : False
ReceivePackets                       : False
TcpPackets                           : False
UdpPackets                           : False
FullPackets                          : False
FilterIPAddressList                  :
EventLogLevel                        : 2
UseSystemEventLog                    : False
EnableLoggingToFile                  : True
EnableLogFileRollover                : True
LogFilePath                          : c:\windows\system32\dns\logs\dns.log
MaxMBFileSize                        : 500000000
WriteThrough                         : False
EnableLoggingForLocalLookupEvent     : True
EnableLoggingForPluginDllEvent       : True
EnableLoggingForRecursiveLookupEvent : True
EnableLoggingForRemoteServerEvent    : True
EnableLoggingForServerStartStopEvent : True
EnableLoggingForTombstoneEvent       : True
EnableLoggingForZoneDataWriteEvent   : True
EnableLoggingForZoneLoadingEvent     : True

顶部的查询 - FullPackets 似乎是 DNS 调试日志部分。在 GUI 中哪里可以禁用 EnableLoggingtoFile 和 SaveLogs?当然,随着时间的推移,每天 500MB 的文件会堵塞硬盘。

domain-name-system
  • 2 2 个回答
  • 864 Views

2 个回答

  • Voted
  1. Best Answer
    Greg Esposito
    2018-08-18T05:21:02+08:002018-08-18T05:21:02+08:00

    发现 GUI DNS 调试日志属性控制顶部部分,查询 - FullPackets,但如果底部部分设置为 True,即使SaveLogsToPersistentStorage 设置为 False,它们也会被记录。

    这通过比较启用和未启用底部部分的日志数据得到证实。启用了标准 GUI DNS 调试日志属性数据的 DNS 日志如下所示:

    8/17/2018 9:08:39 AM 1B70 PACKET  00000041E490A160 UDP Snd 8.8.4.4         524b   Q [0001   D   NOERROR] A      (8)clients6(6)google(3)com(0)
    8/17/2018 9:08:39 AM 1B70 PACKET  00000041E38B8170 UDP Snd 10.200.56.5     a3ae R Q [8081   DR  NOERROR] A      (8)clients6(6)google(3)com(0)  
    

    但更详细的日志如下所示:

    8/15/2018 9:52:55 PM 1338 LOOKUP  Writing AAAA records for node #DC#.local. (000000D5CAC007C0)
                         to additional section of packet 000000D5CC19A130
    8/15/2018 9:52:55 PM 1338 LOOKUP  Writing A records for node #DC#.local. (000000D5CAC004A0)
                         to additional section of packet 000000D5CC19A130
    8/15/2018 9:52:55 PM 1338 LOOKUP  Writing AAAA records for node #DC#.local. (000000D5CAC004A0)
                         to additional section of packet 000000D5CC19A130
    8/15/2018 9:52:55 PM 1338 LOOKUP  Writing A records for node #DC#.local. (000000D5CABFD330)
                         to additional section of packet 000000D5CC19A130
    8/15/2018 9:52:55 PM 1338 LOOKUP  Writing AAAA records for node #DC#.local. (000000D5CABFD330)
                         to additional section of packet 000000D5CC19A130
    8/15/2018 9:52:55 PM 1338 LOOKUP  Query name (1)1(1)0(1)0(3)127(7)in-addr(4)arpa(0)
                         zone          127.in-addr.arpa (type 1)
                         node          1.0.0.127.in-addr.arpa. (000000D5CABF6B40)
                         closest node  1.0.0.127.in-addr.arpa. (000000D5CABF6B40)
    

    因此,我通过以下方式关闭了 Powershell 的高级日志记录选项:

    set-dnsserverdiagnostics 
    -EnableLoggingForLocalLookupEvent False 
    -EnableLoggingForPluginDllEvent False 
    -EnableLoggingForRecursiveLookupEvent False 
    -EnableLoggingForRemoteServerEvent False 
    -EnableLoggingForServerStartStopEvent False 
    -EnableLoggingForTombstoneEvent False 
    -EnableLoggingForZoneDataWriteEvent False 
    -EnableLoggingForZoneLoadingEvent False
    
    • 0
  2. NRomero
    2022-01-26T14:57:02+08:002022-01-26T14:57:02+08:00

    对于 Windows Server 2019 上的 DNS,除了 Greg 的建议外,我还必须将 LogFilePath 设置为 $null。在此之前,每当我启动 DNS 服务时,日志文件就会不断重新出现。

    设置 DnsServerDiagnostics -LogFilePath $null

    • 0

相关问题

  • Solaris DNS

  • resolv.conf 在经过一段时间后被更改

  • 为什么有些网站的网址中没有“www”就无法显示?[关闭]

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve