How can an internal DNS server work in relation to a domain name we currently own?
If my company's website is example.com
and it currently points to a DNS server elsewhere that points to the website's server, also elsewhere... how does it work to set up locally available addresses?
For example: We have 3 development servers and 3 staging servers. I would like each to point to:
something.example.com
somethingelse.example.com
etc...
However this only needs to be available locally, each available on... 192.168.0.XXX
Note: I doubt I can point the external DNS server back to my local servers since I do not have a static IP to address these properly.
Is this possible to set up? How does it work, conceptually? Any information on the subject that could help me understand this would be greatly appreciated.
I do this by having two views in my DNS servers, so internal queries to internal servers resolve to internal IPs but they're invisible to the outside world.
You could use this to give each environment fake information that it's the real
example.com
, but I wouldn't: it'll make things more difficult to administer when you're not working an a consistent environment.Your question was a little unclear; I'm not sure what you mean by "point", exactly, or who's resolving what. If this doesn't answer your question, try to clarify your information some.
What you need to set up (called by any other name) is split horizon DNS.
http://en.wikipedia.org/wiki/Split-horizon_DNS
Not being able to use NS records to give your internal nameservers control over part of your domain, there are only a few options.
Use the 192.x addresses in your public DNS is one option. No one will be able to reach the systems unless they're in your network. However, should someone guess the name they will know a little about your internal infrastructure.
What I do is I have a custom TLD that does not exist in the real world, and I use that internally. An example could be .myc (mycompany). And then on my server for web development I simply create vhosts to reflect that.
E.g. development.myc testing.myc pre-prod.myc
Could be anything basically. I also use this for all computers internally and I publish information in the internal DNS about where a computer is located.
To expand upon
joeqwerty
's answer: What you need is "split horizon" DNS service, and there are several ways to set this up, depending in part from what softwares you are using. Once you have set it up, don't forget to map in the parts of the external view of your part of the DNS namespace that you also want to exist as-is in your internal view. There are two ways to do this, too.