-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Question: how do conditionally rewrite based on ctag group #2098
Comments
Hmm, I guess this is not possible with how it's currently implemented. One possible solution would be to introduce a new Something like this: In this case, you will be able to use other modifiers like |
Thanks @ameshkov , In case anyone else runs into this thread looking for a solution, here's how you can add a second dns server the way I did:
|
If you think that this |
Yes, definitely. $dnsrewrite with $ctag would be really powerful! |
v0.103.3
AGH DHCP points the client to AGH DNS
What's my use case?
I'd like to return internal IP addresses for a subset of clients based on ctag modifiers. Other clients shouldn't be blocked from reaching those addresses, but they should get public IP addresses.
The only workaround I can think of is to have a second DNS server that provides these internal addresses and use it as the upstream resolver for clients needing these internal addresses. I don't believe I could use ctag rules to set that up though.
admins get public, others get internal (WORKING)
192.168.1.10 test1.domain.com
@@test1.domain.com^$ctag=user_admin
this is an example of the opposite of what I'm trying to do. The catch-all address should be public.
admins get public, others get blocked (WORKING)
0.0.0.0 test2.domain.com
@@test2.domain.com^$ctag=user_admin
admins get an internal address, others get public (NOT WORKING)
192.168.1.10 test3.domain.com
||test3.domain.com^$ctag~user_admin
Related page:
https://github.com/AdguardTeam/AdGuardHome/wiki/Hosts-Blocklists#ctag
What is the recommended way of handling this?
The text was updated successfully, but these errors were encountered: