is there a way to add dhcp-client dns server to an address list?
Yes, you can do that.
You must write one script:
- read dhcp-client provided parameters;
- put on address-list.
/ip firewall address-list add list="dhcp_dns_list" address=[/ip dhcp-client get value-name=primary-dns ([/ip dhcp-client find where interface=ether8]->0)]
Missing some check, write yourself:
- dhcp client must use peer-dns;
- the dhcp server must provide one or two dns;
- must be run only when dhcp client are registered;
- do not remove previous values from the list;
- do not consider secondary-dns;
- If consider secondary-dns, check if the provider provide that;
- etc.
hmmm this is interesting, going to read the wiki about script this weekend ![]()