Have customDNS mapping with foo.bar and conditional mapping with custom resolver for clients.foo.bar #1323
-
Finding a proper title for this was kinda challenging so I'm going to explain it by examples. customDNS:
mapping:
foo.bar: 192.168.0.7
jupiter.foo.bar: 192.168.0.8 I use this customDNS configuration with two hosts that have each a traefik running on them. Thanks to the way blocky works, container1.foo.bar, container2.foo.bar etc. will all resolve to 192.168.0.7 and traefik will pick it up and serve the matching container's page. Now I am also running a dhcp server and a custom dns resolver for local clients on 192.168.0.8 (could be any other host) and I wanted to put all clients under the conditional:
mapping:
clients.foo.bar: tcp+udp:192.168.0.8:5353 Something like Instead, blocky keeps resolving Is this intended? Without looking into the code, is there any possibility to change this behaviour without refactoring everything? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Had a quick look into the code and if I understand it correctly, there's a chain resolver that goes through all the types of resolvers and keeps on going if it wasn't able to resolve the request. I assume my problem lies in the order of resolvers. The conditional resolver comes after the customDNS resolver probably causing the problem. I assume that simply changing the order of resolvers may lead to other issues? |
Beta Was this translation helpful? Give feedback.
Yeah the issue here is you're wanting something that's incompatible with the resolver order, and that order is not configurable.
The issues you'd run into would mostly be use case dependent as you're changing the resolver priorities.
I haven't tested this, but I think you can use a
rewrite
as a workaround:skip-custom
doesn't have any special meaning, it's just not present in themapping
. So IIRC thecustomDNS
resolver will just ignore requests forclients.foo.bar
.