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.

you are my last hope. I spent the last 2 days trying configure BIND on my CentOS 5.9 with nameservers in resolv.conf. Then I ask help to my hosting, they said:

Hello, You must register your own nameservers, as we usually don't provide DNS for Virtual servers. Let me know your domain name and I can guide you through the process. Both the ns1 and ns2 records should point to your server's IP. The entries in resolv.conf are for the outgoing connections, and should not be edited.

So i tried to point domain to main server ip (obviously without success) Now i don't trust hosting support

Should I request another 2 ip to my hosting and setting up BIND, or should i configure BIND with the resolv.conf nameservers?

share|improve this question
4  
I'd just use a hosted service like Amazon Route 53. If you're having days worth of trouble getting BIND setup, let someone else manage it for you. –  ceejayoz Jan 31 '13 at 16:59
    
Your resolv.conf just lists the servers used by your server for doing lookups, which should be your hosts DNS resolvers, or a 3rd party service like Google or OpenDNS. As mentioned by support, if DNS lookups are working on your server already, there's no reason to change this. –  USD Matt Jan 31 '13 at 17:05
1  
Regarding authorative DNS for your domain, as you don't really seem to know much about DNS and only have 1 server (you should have at least 2 for auth DNS, and pointing both to one server as mentioned by the support isn't really a good solution), I'm with ceejayoz, just use a hosted DNS service. –  USD Matt Jan 31 '13 at 17:07
add comment

1 Answer

Your problem description is a bit unclear on what you really want to do, and you should heed the advice given in the comments. You probably ought to be considering a hosted DNS solution of some sort -- the registrar that you used to register your domain probably offers one or there are many other options.

But if you are determined to operate your own authoritative DNS server for your domain, here's what you will need to do (at a minimum):

  • Install the BIND software package.
  • Edit the BIND configuration file, named.conf, to declare a zone, to allow authoritative queries, and to permit zone transfer to a secondary slave server.
  • Create a zone master file containing the basic resource records for your zone. At the minimum you must have an SOA record for the zone and you will probably also want A records for your server, an MX record for your mail exchanger, and possibly other record types.
  • Arrange a second, separate nameserver to replicate the zone data on your master server and act as a slave so that you have the required two nameservers for your domain.
  • Instruct your registrar to delegate the forward lookup zone to your new nameserver(s) and add any required glue records.
  • Deal with your ISP to arrange either delegation of the reverse lookup zone or insertion of PTR records into a zone managed by them.

If you can look at that checklist and say "OK, I know how to do that, that, that.. Got it!" then you are ready to begin work. Otherwise you have some reading to do or need to re-think whether you would rather have someone else handling your DNS server operation until you understand the basics.

If you insist on doing it yourself, Cricket Liu's book DNS and BIND, published by O'Reilly Associates, is a very good introduction. If you cannot afford it, you can probably get most of the information you need for free from Zytrax's on-line book DNS For Rocket Scientists. The latter has a chapter with several sample nameserver configurations which you can use as a starting point.

share|improve this answer
add comment

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.