Don't use Dnsmasq for local lookups in /etc/resolv.conf

I've just spent the last 2 hours tinkering and searching for a solution. I know that if I remove dnsmasq I can easily use the search domain and dns ip's from an interface, which is what I do on any satellite devices. But I really need this to work on my main router.

The scenario is that I want to use DNSMasq for my guest network, and then I have DHCP options on each interface to use an external DNS server. This works, but the issue is that the internal /etc/resolv.conf and linked files in /tmp, all are using 127,0.0.1. but I need openwrt to also use my external dns server and search domain.

I've had hit/miss results since I have multiple routers, and the best I've been able to do is get just the ip addresses in /etc/resolv.conf, yet the custom search domain I set an an internal interface is not added.

Here's a sample config of the dnsmasq config

config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option expandhosts '1'
	option readethers '1'
	option ednspacket_max '1232'
	option confdir '/mnt/data/app/dnsmasq/'
	option leasefile '/mnt/data/app/dhcp/dhcp.leases'
	option rebind_protection '0'
	option localservice '0'
	option authoritative '1'
	option local '/lan/'
	option domain 'lan'
	list server '1.1.1.1'
	list server '8.8.8.8'
	option allservers '1'
	list interface 'lan'
	list interface 'domain'
	list interface 'devices'
        option add_local_domain '0'
	option cachelocal '0'
        option localservice '0'     
	list notinterface 'loopback'

What do I need to do to get dnsmasq to STOP trying to be the primary DNS server on the router?
I've also thought about making/removing the symlink on /etc/resolv.conf to a static-file but I want it to survive updates.

Set your external DNS server on the interface from which it is directly reachable.
Option cachelocal '0' will add it to /tmp/resolv.conf

To add your custom search domain:

    option domain 'example.com'
    option add_local_domain '1'

Disable the DNS function of dnsmasq.

    option port '0'    

You can ignore the presence of 127.0.0.1 in /etc/resolv.conf, because dnsmasq no longer listens on any local interface.

Thanks but this isn't what I'm looking for...I want dnsmasq to continue working as normal dns server, so that the guest network uses it

But when I am ssh into the router, or it's doing typical background tasks, I want the router itself to use my custom dns server and search domain.

I do not want dnsmasq using my private domain as it's search, nor do I want it forwarding requests to my custom server.

Well, I thought you only needed dnsmasq for DHCP.
You could try playing with multiple DNS instances.