Score:1

How to configure dnsmasq per interface nameservers from DHCP leases

tl flag

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?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.