Mate - my knowledge is maxxed I have no idea how to do what you suggest!
Hahah, ok. If it's working, don't touch it
Wow. I want to figuratively punch Ubiquiti right now.
Found this on their forums: https://community.ui.com/questions/UDM-Pro-DNS-Filter-Filter-causing-2-4-second-timeouts/fc7b21dd-f1aa-4ae3-87e3-376bb7ab6f59
I turned DNS Filters off (under Internet Security in the controller) on the UDM and now local domain lookups work. Conditional Forwarding is working perfectly - no need for the script.
All that reworking of the scripting and it's as simple as this.
Grrrr....
Thanks,
Shane.
Yeah, there are more and more decisions from Ubiquiti a lot of customers can't understand...
Note, the behavior is not a bug but by design.
Thy released a new beta which has inital support for black/whitlist domain filtering. Maybe you can add your localdomain to the whitelist there.