Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In the process of setting up an internal server for the first time (Mac OSX 10.8) and trying to understand how to setup the DNS service and whether I even need to provide it myself.

Today we have a registered domain (company.com), with a hosted website at squarespace for my marketing people to edit it without by help. Our server is currently configured mainly as a file and LDAP server at server.company.com. We have a static IP address and DNS records pointing server.company.com to our IP where the router handles the ports beautifully. The issue is inside our network.

While server.company.com inside the network correctly points to the machine, mail.company.com, www.company.com, or any other domain fails to lookup correctly. To remedy this, I put in A records to redirect mail.company.com, calendar.company.com, etc to the appropriate destinations (we use google for this).

However, I cannot get the www set to correctly transfer to squarespace.

My questions are:
1 - Am I doing something wrong? If so, what?
2 - Would it be better to simply pay for a hosted DNS solution outside our network?
3 - Any other suggestions?

Any help would be incredibly useful as this is a first for me and has so far been the only roadblock.

share|improve this question
    
Do you need to use the same domain name internally? Normally what we do is either use a bogus tld or a subdomin. Everything internal is corp.company.com, or company.lan. This way you don't wind up with internal resources shadowing external ones –  Doon May 14 '13 at 0:51
    
Do we need to? No - but the elegance of it is what I'm after. If it's too time consuming or I'm just being silly I can change it. Thought I would ask here before giving up. –  sshefer May 14 '13 at 1:03
    
Other reason I would like them to be the same is for mobile users. I want them to simply remember server.company.com as the address for either internal access, VPN, jabber, etc. –  sshefer May 14 '13 at 2:51

3 Answers 3

For a small network, I use a lightweight DNS server inside the LAN. dnsmasq works well on Linux based systems and also works for Mac. It can load addresses from a hosts file which makes it easy to configure. It can also act as a DHCP server and serve DNS records for the leased addresses as well.

share|improve this answer

You can follow the tutorial http://krypted.com/mac-os-x-server/managing-dns-using-mac-os-x-mountain-lion-server/ for enabling the dns server and creating records. Make sure that you allow all of your internal IPs the ability to perform lookups off the server, and then set your server's IP as their main dns server.

If it very important that you create each/ever record from the outside that you want to be the same IE www.company.com, etc..) Since any record you do not create will not exist to internal clients. Then just change the IP for the host you want (server.company.com) to map to it's internal IP and you should be good to go.

share|improve this answer
    
The main problem is that www.company.com on my internal network resolves to company.com, which goes back to my server rather than the entry I have put in for squarespace. All other entries are working perfectly and I am happy with the setup. –  sshefer May 14 '13 at 22:23
    
well if you control the dns, can you just create the A record for company.com to point to squarespace? –  Doon May 15 '13 at 0:51
    
In OSX I can't create a DNS entry without a hostname via the Server app GUI. Does it have to be added via Terminal? –  sshefer May 15 '13 at 1:44
    
hmm I am not sure, as i run bind manually. Try creating a hostname of . or of company.com. (the final dot is important) or maybe even @ all of those should refer to the current zone. –  Doon May 15 '13 at 18:23
    
Did some research and found that setting a hostname to . or * will just get "fixed" by mac os x on restart. :( –  sshefer May 15 '13 at 18:24

Right now does not seem possible using the GUI or command line - put in a simple redirect for my users when they visit company.com that just routes them to the squarespace page. Seems to be only fix.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.