Debian – Cannot resolve domain from within LAN

debiandomain-name-systemdyndnsmac-osx

I just set up a Debian server in our office. We have a business account with comcast without static IP, so I'm using DynDNS to point a domain at the machine. The problem is that I can't resolve the domain from within the network.

It is my understanding that there is no way around this using the comcast business gateway, so I would need to set up some sort of local DNS (if anyone knows otherwise that would be great).

I have a basic understanding of DNS, and I'm assuming that I need a setup that will resolve the domain to the local IP when a user is on the office network and use the global DNS record otherwise. Am I on the right track? If so, what is the best way to achieve this?

All the clients are running OSX.

Best Answer

Set up a DNS server for LAN access only and hand it's address out via DHCP. That DNS server acts as an authoritative server for your domain but issues LAN address rather than the public address.