Arseniy Ermilov
Arseniy Ermilov

Reputation: 35

Configure dns server

I have several questions about dns. I have apache server on my computer and static ip and i bought domain. So when i enter in my browser blablabla.com , it redirects me to my site. Its ok. But i want to setup my own dns server on the same computer where i have my site. I set up bind9. Here are some questions:

  1. Should i buy two domain's, so there will be my dns server and is it necessarily that ns will look like ns1.blablabla.com or its ok if it is blublublu.com ?
  2. When i buy domain for my dns server, should i add record (on the site where i bought it) @ A "mi ip where my site is ?
  3. When i do this, i must enter ns(blublublu.com or ns1.blablabla.com) in site where i bought domain blablabla.com (my site) ? It will work because dns use 53 port, and apache use 80 port ?
  4. Did i correctly write db.blablabla.com int /etc/bind ?

$TTL 604800

@   IN  SOA blablabla.com. root.blablabla.com. (
                  2     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
    IN  A   192.168.100.13
;

@   IN  NS  blublublu.com. (ns.blablabla.com) ??
@   IN  A   192.168.100.13 ??? or there must be my static ip addresse ??
@   IN  AAAA    ::1
ns  IN  A   192.168.100.13

Upvotes: 1

Views: 1379

Answers (1)

Tsangares
Tsangares

Reputation: 825

  1. You can use any domain. It really does not matter. The point of having a ns1.domain.com and a ns2.domain.com is the intention that ns1.domain.com is on one computer and ns2.domain.com is on another computer. That way if the computer on ns1.domain.com fails for some reason, traffic get redirected to ns2.domain.com and there was no down time for your websites. The actual domain you use can be anything as long as you own it. You also do not need to have two seperate computers, you can just point both ns1.domain.com and ns2.domain.com to the same ip, the ip of your bind server.

  2. Where you buy your domain, you have to tell the person you bought it from that the domain is for a name-server. This is different then entering in an A record. The url, ns1.domain.com has to be entered into the authoritative name servers. Just do a search asking for setting up nameserver on your domain .100.14 //subdomain of ns2.blublublu.com, if is the same computer (not ideal) then it would be the same ip I hope this helps the next person

Upvotes: 1

Related Questions