Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] 请求屏蔽 any 请求的插件功能加入 #737

Closed
sbwml opened this issue Oct 23, 2023 · 3 comments
Closed

[Feature request] 请求屏蔽 any 请求的插件功能加入 #737

sbwml opened this issue Oct 23, 2023 · 3 comments

Comments

@sbwml
Copy link

sbwml commented Oct 23, 2023

希望添加的功能

屏蔽 ANY 在公网部署 MosDNS 可以有效屏蔽对服务器的恶意消耗。RFC8482

CoreDNS 实现插件参考:https://github.com/coredns/coredns/tree/master/plugin/any

其效果为:

[root@centos ~]# q "@https://mydns.com/dns-query" www.qq.com any
www.qq.com. 2h21m22s HINFO "ANY obsoleted" "See RFC 8482"

虽然 mosdns 可以通过丢弃 255 (any) 请求类型的方式来实现,但是如果做成现成插件,会变得非常方便。

  - tag: ""
    type: sequence
    args:
      - matches: qtype 255
        exec: reject 3
@IrineSistiana
Copy link
Owner

如果做成现成插件,会变得非常方便。

直接 match 255 需要两行配置

做成插件需要写三行。

    args:
      - exec: reject_any
      - match: has_resp
         exec: accept

@sbwml
Copy link
Author

sbwml commented Oct 23, 2023

有道理,不过其实就是想它 return 个 ANY obsoleted 的信息出来 😂

@IrineSistiana
Copy link
Owner

没人会请求 any。直接丢弃都可以。回复一个 REFUSE 已经算仁慈了。

@IrineSistiana IrineSistiana closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants