大网数据广告活动
服务器运维问答

DNS server getting spammed by ANY queries for the domain "."

· 52CE 我爱测

I have a custom DNS server and I noticed that the logs are getting filled with queries of type ANY for the . (single dot) domain, instead of www.example.com. or other domains which it could handle. It is not recursive and only ha…

问题原文

原帖链接 · Daniel F · CC BY-SA 4.0

I have a custom DNS server and I noticed that the logs are getting filled with queries of type ANY for the . (single dot) domain, instead of www.example.com. or other domains which it could handle. It is not recursive and only handles very specific subdomains of the main domains, which are managed by commercial DNS hosting providers.

I don't respond at all to any query for domains which are not mine, because I want to avoid to be misused for DNS Amplification attacks. Please correct me if this is bad. Prior to this I was responding with dnslib.RCODE.REFUSED (code 5) response codes.

So I'm not really sure if these are some kind of attacks or a normal thing which happens. These are bursts of about 5-10 seconds in length with about 5-10 queries per second which happen a couple of times a minute.

Since I was storing these queries in a database I see that the IPs creating the most queries are very specific IPs from AT&T, then Comcast, although they could be spoofed.

What do I do with this? Ignore it because there is nothing I can do about it? It doesn't create any noticeable load on the server.

已采纳解答

原帖链接 · Patrick Mevzek · CC BY-SA 4.0

You should ignore them, until they really start to disrupt your server/network because of their scale.

Otherwise you could put filters in place at the IP level for the IP sources or the specific DNS query you get, but this is hard to do properly, it is brittle due to the way DNS packets are built, and may have sideeffects to innocent bystanders.

So look instead at the rate-limiting (RRL) feature that exist in multiple nameservers, like bind.

Also note that ANY queries are now obsolete. Look at https://blog.cloudflare.com/deprecating-dns-any-meta-query-type/ for some introduction on this topic, and https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/

The IETF standard is now RFC 8482 "Providing Minimal-Sized Responses to DNS Queries That Have QTYPE=ANY"

Abstract

The Domain Name System (DNS) specifies a query type (QTYPE) "ANY". The operator of an authoritative DNS server might choose not to
respond to such queries for reasons of local policy, motivated by
security, performance, or other reasons.

The DNS specification does not include specific guidance for the
behavior of DNS servers or clients in this situation. This document
aims to provide such guidance.

This document updates RFCs 1034 and 1035.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-09-06)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。