Starting with DNS

Magistar

Verified User
Joined
May 31, 2014
Messages
105
I have been running my CentOS6 VPS with DirectAdmin for a few months now. However so far I have been registering domains at a wholesale company and have been using their nameservers. Now the downside is that DNS control on my directadmin has no effect at all.

From Google I have learned that DirectAdmin has a built in namesever called "named". Unfortunately I can only find configuration on how to disable it. Can someone provide me with some instructions on how to get it going?

current situation (example)
Directadmin reseller: magistar.com
Directadmin administrator setting:
hostname: vps1.magistar.com
ns1 nszero1.wholesale.net
ns2 nszero2.wholesale.net
Client panel settings on wholesale:
Use their DNS+ TXT, MX and A records for magistar.com (local, mail, pop, etc) and an A record for vps1.magistar.com.

Issue
I have another website running on my DirectAdmin on userlevel: mywebsite.com. I want this website to have a working DNS control from DirectAdmin. This week I wanted to add factorio.mywebsite.com.

Now currently I would have go to the wholesaler and add: "A record factorio.mywebsite.com 192.168.1.1" to their client panel. I have the option on my wholesaler to disable their DNS and enter nameserver 1 and nameserver 2. But it gets confusing... If I enter ns1.magistar.com and ns2.magistar.com then how to I setup the DNS for that? I can only add A, MX, CNAME, PTR, AAAA, SRV, TXT, SPF. Is ns1.magistar.com a regular A record? If so, does it automatically work? Do I configure named somewhere?

Attempt so far:
@wholesale: Create A record for ns1.magistar.com and ns2.magistar.com on their nameservers.
@wholesale: Disable DNS control on mywebsite.com + add ns1.magistar.com as nameserver
@vps: Add mywebsite.com to DirectAdmin on userlevel.

So far ns1.magistar.com is resolving, but mywebsite.com is not.

I also tried to go to my reseller account>nameservers for magistar.com and hit the create nameservers option:
Cannot Execute Your Request

Details

85.222.xxx.xx is the server ip and you are not allowed to create a nameserver on it
So I guess it is problematic that my domain is associated with my reseller account instead of my administrator account? My Administrator account has NO domain.
 
Last edited:
DNS are created automatically when a domain is created.

So, you only would need to add ns1 and ns2 A record to your domain dns using server IP on both DirectAdmin and at registar.

Once you've added those two record (and DNS are propagated, test with a ping) you can check if dns are working using dig command from console: dig @ns1.YOURDOMAIN.TLD YOURDOMAIN.TLD A

If you receive reply with correct info, example:

Code:
;; QUESTION SECTION:
;crazynetwork.it.               IN      A

;; ANSWER SECTION:
crazynetwork.it.        3600    IN      A       93.63.162.60

;; AUTHORITY SECTION:
crazynetwork.it.        3600    IN      NS      ns2.crazynetwork.it.
crazynetwork.it.        3600    IN      NS      ns3.crazynetwork.it.
crazynetwork.it.        3600    IN      NS      ns1.crazynetwork.it.

Then your DNS is working fine, and you can change nameserver at registart with your new ns1.domain.tld and ns2.domain.tld

Once this change is propagated (test with intodns.com/yourdomain.tld) your DNS will be managed by DirectAdmin

Regards
 
Ok thanks a lot! Indeed it seems to be working with the A record (so far I set only 1 domain to use ns1.magistar.com).

Follow up question:
Would you recommend getting a second server for ns2? If the server is down then all the domains are down anyway. Or is there something I am missing?
 
Well is always suggested to have 2 or even 3, usually on different subnet.

Beside that, yes, if server is down all is down, but DNS take up to 48 hours to propagate, so, if downtime is a long one, you may have that server is up again but DNS need to be re-propagate and so have up to 48h of additional downtime.

Regards
 
Ok thanks! Seems to be working for some domains on my server on which I tested this:).

The only thing I have not been able to do is creating the A records of ns1.magistar.com and ns2.magistar.com on DirectAdmin itself because I assigned this domain to a reseller user instead of the admin. Admin has no domain, was working fine so far. On the reseller user it is forbidding me to create nameservers for the server ip. How do I create the required A record in that scenario?
 
You need to create them on DNS Management, not Nameserver.

You can either do that on admin lever, DNS Administrator

Regards
 
Ok thanks I found it where you said I it was and and created four A-records :). I was unsure if I had to do:

ns1.domain.com A 1.2.3.4
OR
ns1.domain.com. A 1.2.3.4

I am gonna guess the second option is correct but I did not want any downtime :).

Also I just switched a second domain to my own nameservers but this one is no longer resolving (it is www.wedeko.nl ):(. Is it normal for some downtime to be involved when I switch from registrar DNS to my own nameservers?

edit: The registrar itself seems to be having technical difficulties, their entire website is down... Maybe it is related.
 
Last edited:
Ok great.

Great url, much better than whois.com. Status seems to be good now (except warning about same subnet and single failure point). Also the domain seems to be working again for me :).

Thanks a lot for all you help.

DNS stuff is a bit scary because when you make a mistake you have at least 24h downtime...So far I have transfered 4 out of 8 domains. The most scary one will be server domain because if the A record of the nameserver stops resolving it will probably bring down everything! So far I have left that one under registrar DNS control :P.

edit: Attempt started...
-Changed nameservers on registrar (with ip included)
-Changed DA administrator settings to my new ns settings
-Created the reverse ip with this guide: http://help.directadmin.com/item.php?id=21
-Doublechecked domain settings IN da to see if the ns1 and ns2 were there.

So far intoDNS is showing that my nameservers have no A records on all domains. But since each domain seemed to take about 1-2 hours to get online again I hope this will resolve itself!
 
Last edited:
It seems ok but you really should use more than 1 ipadres/nameserver
All of your nameservers have the same ip address
 
I have a reseller account on another server that I could use. However that would mean I have to manually change the records on that account each time something changes.
 
The record for nameserver usually have to be register at registar aswell, you should have a page where to put nameservers and IPs so the registar already know the nameservers ip

Regards
 
(Correct, I had already registered IP at registrar because when I tried to do without it got refused).

Good news; since a few minutes intodns shows all good :D (except for the only 1 server issue). So thanks a lot for helping me move to my own nameservers. Now all that remains is figure out the second server situation :P.
 
Back
Top