Fix “DNS hostname not available” on server behind firewall

domain-name-systemopenldapreverse-dns

I am running Max OS X Server and can't set up Open Directory. I get an error saying that "This computer's host name is invalid. The host name does not resolve to any configured address of this computer. Please ensure the host name is correct."

I ran changeip -checkhostname and get (x's inserted to anonymize):

Primary address     = 192.168.xx.xx

Current HostName    = xx.xxxxx.com

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

dirserv:success = "success"

This is a similar question to
Repair DNS Hostname mac server but in this case, our DNS entry for our host name resolves to a real, reachable IP address and we have a firewall that forwards requests to our internal, 192.168.xx.xx IP.

How do I get around this issue?

Best Answer

You need an internal entry pointing to your LAN ip to override the public ip found on the DNS server. You could run an internal DNS server or may be as simple as putting an entry in your hosts file.

To add an internal entry pointing to your LAN IP:

  • Turn on DNS services on the server (using Server app)
  • Add a host entry for my internal IP/domain name (also using Server app)
  • In System Preferences on the Server, add my local IP to my list of DNS entries so it looks at the local DNS server first
Related Topic