Community discussions

MikroTik App
 
button
just joined
Topic Author
Posts: 12
Joined: Mon May 02, 2022 1:18 am

static DNS-entries first, adguard second

Thu Mar 16, 2023 1:22 am

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
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3255
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: static DNS-entries first, adguard second

Thu Mar 16, 2023 1:41 am

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.
 
marsbeetle
newbie
Posts: 38
Joined: Sun Feb 19, 2023 9:57 am

Re: static DNS-entries first, adguard second

Thu Mar 16, 2023 7:03 am

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.
Image
 
button
just joined
Topic Author
Posts: 12
Joined: Mon May 02, 2022 1:18 am

Re: static DNS-entries first, adguard second

Thu Mar 16, 2023 6:30 pm

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?

Who is online

Users browsing this forum: Ahrefs [Bot] and 48 guests