I have two internal networks, and each network needs a different upstream DNS server. I have two DNSMASQ instances, each one configured to serve one network and use a different upstream DNS; this is working as expected.
Now, I have moved one network to DNSMASQ + STUBBY, so all the upstream DNS servers are configured on STUBBY, and again this is working as expected. However, in order to move the second network to DNSMASQ + STUBBY, I need to configure a second STUBBY instance.
Stumbled upon this whilst searching for answers to the same question ("can I run mutiple instances of STUBBY?"). I've ended up using DNSMASQ+STUBBY for one network and DNSMASQ+UNBOUND for the other. Not sure whether that's the best way of doing things, but it seems to work for now...
was looking for this, i know we can start second instance stubby with /usr/sbin/stubby -g -C example.conf on different ip and/or port but process start owned by root, is there a simple way to start process as correct user (stubby)??
my specific need is to have two stubby instances on localhost with different port, one with cloudflare#5453 and other with google#5553, so i can specify in my config what to use:
cat /etc/config/dhcp
...
list server '127.0.0.1#5453'
list server '0::1#5453'
list server '/google.com/127.0.0.1#5553'
...
so after a bit of reading here and here, as vgaetera pointed out, creating a second init did the trick for me:
pretty sure that the best solution would be to make stubby init read multiple config files, but i have no idea how to do it. @eduperez bit late and not so clean solution but may work for your needs.