I setup mwan3 to failover to a tethered LTE device (using my COVID-19 downtime to try and increase the reliability of my network). This mostly works fine, but there are 2 "corner cases" that I'm curious if anyone knows how to address:
Q1. If I hard-code my primary ISPs DNS servers as forwarders in dnsmasq (my previous configuration), I have no DNS when I failover to LTE since that ISP doesn't allow external DNS requests (understandably), which these now are. OtoH if I remove my list of forwarders, everything works fine but dnsmasq sends requests to all DNS servers (2 for my primary ISP and 1 for the LTE connection), burning my LTE bandwidth (I pay by the byte).
I know there's an option to make dnsmasq query serially rather than in parallel, but I rather like the parallel feature, just not on the backup interface. I also know I could use a public DNS server, but I'm in a rural area so my ISP's are actually faster, plus getting accurate geolocation is critical for streaming here.
I think what I need is a script that mwan3 runs when interfaces go up/down to tweak the DNS settings. I recall there's a way to run scripts, but I don't know how to safely tweak dnsmasq settings on the fly.
Ideas?
Q2. If I failover to LTE and the primary interface comes back, connections that were active over the backup stay active and routed over the backup interface. This is also understandable (state kept), but I'd actually like to flush them and force a reconnections over the primary interface (again, I pay by the byte, but also LTE is still painfully slow here). Suggestions?