My problem is the following: I have 2 Domain name systems, the standard one, that reflects the internet and a local one that maps names in a local network.
Now I would like to be able to use both of the systems, which the local domain server enables but I do only want to use the local server for lookup of local names.
I have a gateway computer (running Gentoo) that should handle this. My first thought is to somehow tell the local DNS server on the gateway computer to use the local DNS server for local adresses (for example ending with .local) and if it is not a local address then use the normal public DNS server for example Google's.
Unfortunately I have no idea how to tell this to my DNS server on the gateway (currently only dnsmasq is running there, maybe it would work when using bind?)
Already read this: How can I set up Linux to use a different DNS server for a certain domain? but it does not answer my question.