6 Replies Latest reply: Feb 3, 2013 5:23 PM by awilcox
awilcox Level 1 Level 1 (0 points)

Hello,

 

I'm using the 2.2 Server app with Mountain Lion (10.8.2) and setting up DNS again (and again ... ) until I get it right.

 

Config:

One Mac Pro being now used as workstation - and future web server, etc, on the LAN.

Static addr is 192.168.0.1 from the router 192.168.0.1

Primary Zone = ns.moshe.private

Nameserver = ns.moshe.private

Machine Record, A Record, shows ns.moshe.private for both Zone and Host Name (with IP=192.168.0.120)

Reverse Zone = 0.168.192.in-addr.arpa (HUH? Where's the 120?)

NS nameserver record for ns.moshe.private = 0.168.192.in-addr.arpa (this is what Server app is showing)

 

sh-3.2# serveradmin fullstatus dns

dns:primaryZones = 2

dns:readWriteSettingsVersion = 1

dns:servicePortsRestrictionInfo = _empty_array

dns:secondaryZones = 0

dns:startedTime = "2013-01-28 22:46:25 +0000"

dns:version = "BIND 9.8.3-P1"

dns:logPaths:_default_log = "/Library/Logs/named.log"

dns:servicePortsAreRestricted = "NO"

dns:state = "RUNNING"

dns:setStateVersion = 1

sh-3.2#

 

sh-3.2# tail -f /Library/Logs/named.log

28-Jan-2013 17:46:24.469 no longer listening on 10.211.55.2#53

28-Jan-2013 17:46:24.469 no longer listening on 10.37.129.2#53

28-Jan-2013 17:46:24.575 exiting

28-Jan-2013 17:46:26.053 zone 0.0.127.in-addr.arpa/IN/com.apple.ServerAdmin.DNS.public: loaded serial 1997022700

28-Jan-2013 17:46:26.066 zone 0.168.192.in-addr.arpa/IN/com.apple.ServerAdmin.DNS.public: loaded serial 2013012807

28-Jan-2013 17:46:26.254 zone localhost/IN/com.apple.ServerAdmin.DNS.public: loaded serial 42

28-Jan-2013 17:46:26.278 zone ns.moshe.private/IN/com.apple.ServerAdmin.DNS.public: loaded serial 2013012807

28-Jan-2013 17:46:26.278 managed-keys-zone ./IN/com.apple.ServerAdmin.DNS.public: loaded serial 0

28-Jan-2013 17:46:26.279 running

28-Jan-2013 17:46:26.279 zone 0.168.192.in-addr.arpa/IN/com.apple.ServerAdmin.DNS.public: sending notifies (serial 2013012807)

 

NOTE several of the above reverse zones are missing the final octet.

 

So I check ...

 

sh-3.2# nslookup ns.moshe.private

Server:        192.168.0.120

Address:    192.168.0.120#53

Name:    ns.moshe.private

Address: 192.168.0.120

 

sh-3.2# nslookup 192.168.0.120

Server:        192.168.0.1

Address:    192.168.0.1#53

** server can't find 120.0.168.192.in-addr.arpa.: NXDOMAIN

 

NOT good

 

sh-3.2#

sh-3.2# changeip -checkhostname

Primary address     = 192.168.0.120

Current HostName    = moshe

The DNS hostname is not available, please repair DNS and re-run this tool.

dirserv:success = "success"

sh-3.2#

 

What to repair?

 

Thanks for help! Alan


Mac Pro, Mac OS X (10.6.4)
  • 1. Re: DNS Reverse Zone not including all of IP address
    awilcox Level 1 Level 1 (0 points)

    OOPS ...

    In "Config: One Mac Pro being now used as workstation - and future web server, etc, on the LAN.

    Static addr is 192.168.0.1 from the router 192.168.0.1" above ...

     

    Static addr is 192.168.0.120 for the server ns.moshe.private. (brain crash!)

     

    Alan

  • 2. Re: DNS Reverse Zone not including all of IP address
    gracoat Level 3 Level 3 (660 points)

    In terminal, type:

    host 192.168.0.120

     

    It'll show you difinitively whether or not your reverse records are set up properly.

    If nothing appears, then your DNS probably isn't creating reverse records.  OR....

     

    Check in your system prefs that your server is looking to itself for DNS records.

    Click Network, Click the interface in question (probably the ethernet one), Click the Advanced button, Click the DNS tab.  Ensure that the first line is 127.0.0.1.

     

    If it is in fact correct then....

    You've omittied the reverse record from your description so that tells me either, A: you've not written it here, or B: when you created the machine record for ns.moshe.private the server didnt' add the reverse record automatically.

     

    FYI, the in-addr-apra record you're showing here is normal behaviour. 

    If you're server were to be on a subnet that had 255.255.0.0 then the in-addr-arpa record would be missing the last TWO octets.

     

    Write back!  DNS is a sucky beast when it doesn't work properly, but it's not unbeatable!

     

    -Graham

  • 3. Re: DNS Reverse Zone not including all of IP address
    awilcox Level 1 Level 1 (0 points)

    Graham, thanks for reply. Here's what happened:

     

    sh-3.2# host 192.168.0.120

    Host 120.0.168.192.in-addr.arpa. not found: 3(NXDOMAIN)

     

    System Prefs  (seems I overlooked this one!)

    DNS server 192.168.0.1 and 192.168.0.120 ... so I put 127.0.0.1 ahead of those and delete the 120 line.

    Now showing only 127.0.0.1 followed by 192.168.0.1

    Applied

     

    Results:

    sh-3.2# host 192.168.0.120

    120.0.168.192.in-addr.arpa domain name pointer ns.moshe.private.

     

    sh-3.2# nslookup ns.moshe.private

    Server:        127.0.0.1

    Address:    127.0.0.1#53

    Name:    ns.moshe.private

    Address: 192.168.0.120

     

    sh-3.2# nslookup 192.168.0.120

    Server:        127.0.0.1

    Address:    127.0.0.1#53

    120.0.168.192.in-addr.arpa    name = ns.moshe.private.

     

    sh-3.2# changeip -checkhostname

    Primary address     = 192.168.0.120

    Current HostName    = moshe

    DNS HostName        = ns.moshe.private

     

    To fix the hostname please run changeip for your system with the

    appropriate directory with the following values

     

       /Applications/Server.app/Contents/ServerRoot/usr/sbin/changeip 192.168.0.120 192.168.0.120 moshe ns.moshe.private

     

    dirserv:success = "success"

     

    Conclusion:

    Okay on the missing octet. Makes sense.

     

    Appears we're close to a solution here. Except for the last changeip complaint to correct the host name.

     

    The last above "To fix the hostname ..." must be related to the computer's current name "moshe" in system prefs | sharing where it's cited as "moshe.local".  I invoked the above changeip cmd, but it didn't resolve the complaint.

     

    Then I tried in Server app, Server:moshe in sidebar: network tab for moshe shows that both "Computer Name" and "Host Name" are both set to "moshe". So I selected to edit the host name, and selected "host name for private network". Typed Computer name "moshe" and (new) Host Name as ns.moshe.private. Clicked OK to change host name. BUT still shows up the same in Server app and changeip still shows current host name is moshe. Still the same complaint.

     

    How to put this to bed?

     

    Yes, this DNS is a bit of a challenge! Not for the faint of heart.  

     

    Alan

  • 4. Re: DNS Reverse Zone not including all of IP address
    Antonio Rocco Level 6 Level 6 (10,180 points)

    Hi

     

    Changeip states your server's hostname is "moshe" yet the hostname configured in the DNS Service is ns.moshe.private.

     

    It's possible when you selected the edit host name feature, Server App did not apply the changes you made? In which case we could try Terminal to make the change? Launch the application and issue this command:

     

    sudo scutil --get HostName

     

    If the output to screen is not ns.moshe.private issue this command:

     

    sudo scutl --set HostName ns.moshe.private

     

    If it is, issue the command anyway and run the changeip command again and hopefully - this time - it will give you want you want?

     

    On a side note and only on the server itself I prefer to list the server's own IP address as the primary DNS Server rather than its loopback address. Just my opinion but I think this is a 'better' way of doing this. Depending on what you want to achieve you should be configuring whatever you're using for DHCP to push out the Server's IP address as the primary DNS Server to your client devices.

     

    HTH?

     

    Tony

  • 5. Re: DNS Reverse Zone not including all of IP address
    awilcox Level 1 Level 1 (0 points)

    Tony, when I do scutil, I get the following:

     

    sh-3.2# scutil --get HostName

    ns.moshe.private

     

    In Server app, when I select "moshe" in sidebar, and  click Network tab, I see ComputerName=moshe and HostName=moshe

    1. If I click Edit ComputerName, the ComputerName=moshe and the LocalHostName=ns.local (suggested, or is that a real name? In SystemPrefs|Sharing I see ns.local there too.)

    2. If I click Edit HostName, private network, try to change HostName to ns.moshe.private. No success (see my last response above.)

     

    Am I misunderstanding the concept of names here?

     

    ComputerName should be moshe. Web is active and I can browse to https://moshe and see the Server globe, browse to http://moshe and I see the directory I'm using for websites. Web works fine. I can ping moshe ok.

     

    HostName should be ns.moshe.private for DNS. At the moment I only have this server/workstation on the LAN. I should be able to add records (using Server app) for other computers on the same LAN and expect my ns.moshe.private would serve up the proper IP address for them. (As if each had a copy of /etc/hosts to get the IP addresses. BTW: All addresses are preset on router by MAC addresses, and each machine gets its address using DHCP when it comes online.)

     

    I'm perplexed about the ns.local in SystemPrefs|Sharing; I would think that should be just moshe.

     

    After all this, I still see the same two (good) nslookup results as above.

     

    The changeip is the same result too. Must those two names match for DNS to work?

     

    Or should I just set both host and computer names to moshe.local and be done with it?

  • 6. Re: DNS Reverse Zone not including all of IP address
    awilcox Level 1 Level 1 (0 points)

    Solution:

     

    I deleted ALL the DNS records, and did DNS from scratch using just "moshe" as the name for everything. The result after the dust settled is ...

     

    sh-3.2# nslookup 192.168.0.120

    Server:        192.168.0.120

    Address:    192.168.0.120#53

    120.0.168.192.in-addr.arpa    name = moshe.

     

    sh-3.2# nslookup moshe

    Server:        192.168.0.120

    Address:    192.168.0.120#53

    Name:   moshe

    Address: 192.168.0.120

     

    sh-3.2# changeip -checkhostname

    Primary address     = 192.168.0.120

    Current HostName    = moshe

    DNS HostName        = moshe

    The names match. There is nothing to change.

    dirserv:success = "success"

    sh-3.2#

     

    I did setup SysPrefs | Network | DNS for 192.168.0.120 first, then followed by the router's 192.168.0.1 .

     

    http://moshe and https://moshe both work perfectly.

     

    Many thanks to all who helped!

    Alan