Q: access server within domain not working
When I am within my domain I want to access my server.
However its hostname server.mydomain.com does not work.
In Terminal hostname gives server.mydomain.com
nslookup server.mydomain.com
give the right IP
nslookup 10.0.xxx.xx ..the IP number reverses to server.mydomain.com.
But if I put in afp://server.mydomain.com
it does not work.
I have to put in the ip number..
This worries me because it is not expected behavior.
WHY?
Pierre
Mac mini Server (Mid 2010), OS X Server
Posted on Feb 3, 2016 4:18 PM
Yes - you want to put the local OS X Server IP as the first server in the router's DHCP settings - so that every client will receive the correct list of DNS servers. In this case you would set the router's DHCP DNS settings to 10.0.x.x, 8.8.8.8 (don't worry about the Brazilian DNS server here). This will result in every client computer/device receiving the correct two DNS server IP addresses.
On the client computer(s) - you don't need to change anything - other than maybe they need to renew their DHCP leases or have them reboot.
On the network settings of the OS X Server Mac - make sure that you specify 127.0.0.1, 8.8.8.8 as the DNS. The OS X Server itself (will use its own loopback address). Theoretically you should just use 127.0.0.1 (and only have the local loopback here). You can try both ways.
In the DNS Setup screen of Server.app - for forwarding servers you can specify 8.8.8.8 and your (brazilian DNS). Keep in mind that forwarding servers are not required. See below how resolution works when one or more forwarders are specified>
With no forwarders: The OS X Server DNS server will look in its cache - if the cache does not return a result - OS X server will determine if it is authoritative for the requested domain - if so - it will get the answer locally. For any other domain - OS X Server will resolve the query by actually going to the root servers and will provide a response - which it will then cache. Depending on your typical DNS queries - it could be more efficient than using a forwarder.
With forwarders specified: The OS X Server DNS server will look in its cache - if the cache does not return a result - OS X server will determine if it is authoritative for the requested domain - if so - it will get the answer locally. For any other domain - OS X Server will consult the first forwarder to resolve the query. If the forwarder is responding - it will return a success or fail result. If first forwarder not responding - the second server will be consulted. Resolution stops when one of the servers provides a success or fail response.
The important thing to realize with the forwarders - is that "if forwarders are specified - only the forwarders are used to resolve external names - the local OS X Server DNS Server will not consult the root servers. If the forwarders aren't accessible or if they don't don't the answer - the query terminates.
My description of the resolution process may not be 100% correct - but the concept of what happens with forwarders was the point I was trying to make.
Basically - you should experiment by using forwarders and not using forwarders - to determine which is more efficient - it may not be immediately obvious.
One last thing: You should make sure that port 53 (the DNS port) is closed on your router. You don't want your private DNS server accessible to the public - as this can cause problems. (if you believe you have a need to open port 53 on your router - please explain the reasoning for doing so).
~Scott
Posted on Feb 4, 2016 8:26 AM