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

Block based on Return-Code (RCODE) #96

Open
cbuijs opened this issue Oct 16, 2020 · 3 comments
Open

Block based on Return-Code (RCODE) #96

cbuijs opened this issue Oct 16, 2020 · 3 comments

Comments

@cbuijs
Copy link
Contributor

cbuijs commented Oct 16, 2020

Just wondering how difficult it is to add a response group based on return-code, either the number or text-base version.

See here:
Return Codes

For example you could generate a more appropriate response on NXDOMAIN by facilitating an IP-Address pointing to a landing-page or try another query against another DNS server.

@folbricht
Copy link
Owner

folbricht commented Jan 1, 2021

It might be best to have some sort of response router here, one that can "retry" a query if the response matches certain conditions. Like so

[routers.router1]
type="response"
resolver=["google-udp"]
routes = [
  { rcode = 2, resolver="static-1" }, # SERVFAIL
  { rcode = 3, resolver="static-2" }, # NXDOMAIN
]

It could also be done much simpler, without the multi-routing piece

[groups.response-reroute]
type = "response-reroute"
resolvers = ["google-dot"] # Default
rcode = 3 # NXDOMAIN
reroute-resolver = "static-1" # Some static response

Thoughts?

@cbuijs
Copy link
Contributor Author

cbuijs commented Jan 2, 2021

I think the router one is much cleaner, but both would get the job done.

@cbuijs
Copy link
Contributor Author

cbuijs commented Aug 22, 2023

Duplicate of #241

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