I am working on an IoT device that has three network interfaces: Ethernet, WiFi, and LTE. The interfaces provide redundancy and fail-over for network connectivity, and any combination of the interfaces might be up. When more than one interface is up, the interfaces are preferred in the order Ethernet, WiFi, and LTE.
At the moment each of the network interfaces gets a network address via DHCP, and dnsmasq is used as a DNS proxy, forwarding requests to the Cloudflare public domain nameservers. Is it possible to configure dnsmasq to use the nameservers that are received in the DHCP leases, on a per-interface basis?
If I were to configure this statically in dnsmasq.conf I could do
server=172.16.2.1@eth0
server=192.168.1.1@wlan0
server=192.168.2.1@lte0
Is it possible to achieve this using dnsmasq with nameservers received in DHCP leases? How would I go about doing that?