Bypassing local DNS server for www address

zeilstra_thomas
New Contributor II

I've started using the DNS server in macOS server to allow clients to reach our JSS using the computer name rather than having to use the IP address. The problem seems to be when I enable the DNS server and use it to include an entry for <jssServer>.myschool.edu (using 8.8.8.8 as the secondary DNS server for sites that don't have entries on my box--aka everything but the one entry I added), the server seems to be grabbing requests for www.myschool.edu but it doesn't know what to do with them so they just fail. Under normal circumstances, just using 8.8.8.8 as the DNS makes everything work fine (except I can't get to my own server) but now even that isn't working for me. Stuff outside the network works great (again, granted that I can't reach my server but the homepage works fine.)

Is there any way that anyone knows of to add an exception for www. traffic to use the fallback DNS rather than my own local DNS trying to grab it? Have I completely missed some vital point that makes this whole thing irrelevant if I just did something correctly earlier?

1 REPLY 1

Phantom5
Contributor II

I believe you are missing how DNS really works. If you are setting up an internal DNS server, you must recreate all entries in your public DNS server, otherwise your computers won't be able to resolve www.myschool.edu as it's not a record in the zone table. Using 8.8.8.8 as your secondary DNS server in you computer is not going to solve your problem. Secondary DNS servers defined in your computer are fallback servers to use in case the primary server does not answer. So, even if you use 8.8.8.8 as your secondary DNS server, your computers are querying OS X Server for www.myschool.edu.

For what you are trying to accomplish in order to work, I suggest you use your public DNS server and create a record for jss.myschool.edu, or recreate all your *.myschoo.edu zone in your OS X Server DNS service.

Another solution would be to configure a single entry in each computer hosts file /etc/hosts, pointing to the IP address assigned to the JSS server. That way, the Mac would use the host file to resolve the JSS address and use the external DNS to resolve your myschool.edu zone.