I'm using DNSMasq. For some wifi networks I need to have different DNS servers. By default I have the Quad9 DNS addresses. But when I connect to my university network (eduroam) I have to use their provided DNS servers -- Quad9 is blocked.
Is there a way to get the suggested DNS server from the router when I connect, and use that? Ideally I'd like to be able to set whether I want to use their suggestion.
Currently I add a rule to a dnsmasq.d/ directory, and restart dnsmasq whenever I connect, and then remove the file and restart when I disconnect.
I'm using Arch Linux. For network management I use netctl
.
netctl
. I tried usingExecUpPre
to reconfigure dnsmasq when connecting to eduroam, but it didn't work. It never seemed to get called, or if it did, the required DNS servers would be after Quad9.