None of our OS X client machines in our workplace query local DNS names of our servers properly after connecting to VPN. For other client machines – including Linux and Windows – it works properly.

Just some context: our servers were accessible publicly before. Since we started securing everything, we proceed to put them behind a firewall and they are accessible via VPN only. Since our developers are used to accessing the servers via fqdn, we added a local DNS server. So when they connect to our VPN, DHCP + DNS settings would be passed to their machines automatically. Two DNS server IPs, one is for local resolving and one for public resolving. Unfortunately, all of our OS X users are experiencing these problems. Linux and Windows machines aren't.

Server: riker.example.com

  • 120.x.x.x (Public IP address)
  • (Local IP address)

DNS settings that is passed to our users:

  • (for local)
  • (for public)

We have already checked:

  • DNS Server settings of our Fortigate device - we're 100% sure it is correct because our Linux and Windows clients are working.
  • Firewall policies - again, 100% sure because it's working properly with Linux and Windows
  • Check /etc/resolv.conf files of the OS X machines - correct DNS settings given by DNS server [edit June 6, 2016]
  • Flushed DNS cache using this: sudo killall -HUP mDNSResponder
  • Turned off firewall of OS X machines
  • Restarted mDNSresponder

After all these troubleshooting steps, it still does not work.

If I'm connected to VPN, it's still resolving the public IP address, and not the local IP address :

heineken:~ heineken$ ping riker.example.com
PING riker.example.com (120.x.x.x): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
--- riker.example.com ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss
heineken:~ heineken$

But if I ping the local address :

heineken:~ heineken$ ping
PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=63 time=62.714 ms
64 bytes from icmp_seq=1 ttl=63 time=83.162 ms
--- ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 62.714/72.938/83.162/10.224 ms

Checking by dig and nslookup (still connected to VPN):

heineken:~ heineken$ dig @ riker.example.com
; <<>> DiG 9.8.3-P1 <<>> @ riker.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64601
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;riker.example.come. IN A
riker.example.com. 3600 IN A
;; Query time: 58 msec
;; WHEN: Fri Jun 10 11:33:00 2016
;; MSG SIZE  rcvd: 52
heineken:~ heineken$ nslookup riker.example.com
Non-authoritative answer:
Name: riker.example.com

Contents of /etc/resolv.conf of local machine (still connected to VPN):

heineken:~ heineken$ cat /etc/resolv.conf
# Mac OS X Notice
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
# This file is automatically generated.

As you can see above, by pinging the domain it's still gives out the public IP address and not the local IP address. But with dig and nslookup, it's already giving out the local IP Address.

Few more things I did:

  • Tried the solutions presented from here: DNS not resolving on Mac OS X - still did not work for us.
  • I installed a virtual machine CentOS - inside an OS X machine and made it to have a bridge connection. It was resolving correctly the domain locally.
    • This means that Forticlient can be eliminated from the equation since the OS X and CentOS VM is just sharing the same adapter.
  • Seeked L3 support from Fortigate
    • We did a lot of tcpdump on the Fortigate device to check traffic.
      • We discovered that when a Linux or a Windows machine pings a domain it seeks for DNS request from the Fortigate device first.
      • Unfortunately for the OS X machine, it does not do any DNS request from the Fortigate device. So what happens is that it still resolves to the public domain.
    • I was advised by them that the issue is localized on the OS X devices because even after flushing cache, it does not perform any DNS query when pinging riker.example.com. So they cannot help us anymore.

This was tested on: OS X versions: Yosemite 10.10.4, El Capitan 10.11.5 Fortigate 100D Firmware version: v5.2.4,build688 (GA) Forticlient version:

Any advice?

  • also dig @ riker.example.com will always answer with a valid result - if a host riker was added in the dDNS server!
    – klanomath
    Commented Jun 10, 2016 at 6:55
  • @klanomath, yes, i understand. It will always answer with valid result. My question is that how come my local DNS server can resolve it but when i do it does not? Commented Jun 10, 2016 at 8:30
  • I presume the FQDN in question isn't actually riker.example.com? Does it, by any chance, end .local (which OSX treats as a special case for mDNS/Bonjour)?
    – eggyal
    Commented Jun 10, 2016 at 8:40
  • @eggyal Some googling reveals circ....life
    – klanomath
    Commented Jun 10, 2016 at 8:49
  • @eggyai, yes. That is not the real FQDN. I just changed it. Nope, it does not end with .local as well. Commented Jun 10, 2016 at 9:11

1 Answer 1


I think the key to your issue might be that your internal DNS is "non-authorative" (see the output from nslookup), suggested in the answer to this question: DNS resolves servers external IP instead of internal IP

If you run nslookup -type=soa riker.example.com is the "origin" server your local or public DNS server?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .