static DNS-entries first, adguard second

Hey,

I have created a list of static DNS-entries for local devices. This works fine. But I want to add an ad-filter like adguardhome. There is no option to import my list of static dns-entries to the adguard-system. Is there an option to request at first the list of static entries and if there is no entry the request is forwarded to adguard? I am using RouterOS 7.8 on an RB5009.


Greets

Not exactly sure you mean by import them. If you want to export Mikrtoik static DNS in the format as /etc/hosts, this script will do that:

/ip dns static { :foreach h in=[find] do={
 :put "$[get $h address] $[get $h name]"
}}

Adapt as needed in the [find], like just [find type=A] or if you need a comma or tab (which is “\t”), add one between the “address]” “$[get” in the line with :put.

Why would you only want to forward requests to adguard as a last resort? You either use it or you don’t. Adguard also allows you to specify any upstream DNS servers you wish to use which you can add in a list - so you can have multiple as backup and choose how you want to use them with load balancing etc.

So far I maintain the DNS entries in RouterOS and would like to switch to another option only if the maintenance effort does not increase. Since I maintain the IPs and the corresponding MAC addresses in an Excel file and import them with the help of a script into RouterOS, it seems to me as an additional effort if I maintain the DHCP static leases in RouterOS and have to maintain the static DNS entries additionally in Adguard. Furthermore, I can have multiple names pointing to one IP in the DNS server of RouterOS. I also find the DNS of the router more stable. Therefore, this should be at least the fallback solution, because I still prefer to work with names instead of IPs regarding the IOT devices. How could I implement it in adguard if necessary? Do you know a way to import the list of static entries into Adguard?