How to setup DNS

Discussion in 'ISPConfig 3 Priority Support' started by inside83, Jan 22, 2015.

  1. inside83

    inside83 Member

    Hello,

    I have several domains which I was hosting on GoDaddy and now I bought VPS, installed ISPconfig and want to transfer my domains to my new VPS with ISPconfig.
    Maybe it's a newbie question but I would like to know what is the exact configuration of DNS for me to accomplish this.
    Do I put IP address of my VPS in A record (instead of an existing address) and everything else erase and than in ISPconfig's DNS manager set up the rest?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    To run your own dns, you need 2 dns servers, a primary and a secondary dns server. Please take a look in chapter 5.12 of the ispconfig manual for the stps to create your own dns zone in ISPConfig:

    https://www.howtoforge.com/download-the-ispconfig-3-manual

    If the NS records of this domain are subdomain of the same domain, then you have to add the ns1 and ns1 subdomains as A-Records as well.

    When the dns zone has been added in ISPConfig, then you can login at godaddy and set your two dns servers as primary and secondary dns server for the domain.
     
  3. inside83

    inside83 Member

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Your current godaddy settings use the godaddy dns servers as you created a, ns, mx and aother records at godaddy, so you dont need any dns setup at ispconfig.

    To run your own dns, you need 2 servers, one for the primary dns and one for the secondary dns. If they both are using ispconfig does not matter, but it would make it prbably easier to setup.
     
  5. inside83

    inside83 Member

    @till
    I already have two VPS's running ISPconfig 3. They are not in a multiserver setup.
    Can you help to setup my own DNS's? Does that mean that when I want to make some DNS change (add sub-domain or change MX records) - I can use ISPconfig, not my registrars (GoDaddy's) DNS settings?
    Should I follow this: https://www.howtoforge.com/how-to-r...and-secondary-with-ispconfig-3-debian-squeeze
    tutorial and get back if I run into trouble?
     
    Last edited: Jan 26, 2015
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can setup everything in ISPConfig. You have to configre godaddy so that your servers are the nameservers for the domain name and not the ones from godaddy. Then you can use chapter 5 (and only chapter 5!) from the above guide to setup the primary dns record. As your servers are not a multiservers etup, you will then have to add a secondary dns record (the type of the record is secondary) on the second server in ispconfig and add the ip address of the second server in the field Allow zone transfer to" of the dns zone on your first server.
     
  7. inside83

    inside83 Member

    @till
    Sorry, but I'm a little lost.
    I have added A record to mydomain.com for ns1 and ns2 (please see the attached screenshot).
    Domain Details.jpg
    Now what?
    I should add the DNS zone for the mydomain.com domain to both ISPconfig #1 and set ns1.mydomain.com and ns2.mydomain.com as name servers and add Secondary DNS zone to ISPconfig #2 (please see the attached screenshot).
    ISPConfig 3.0.5.4p5 DNS setings.jpg
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    As far as I can see, the authoritive dns server of your domain is the dns server from godaddy, so you dont have to add anything in your ispconfig server as the ispconfig server is non authoritive for this domain. You can either have records and a zonefile at godaddy r in ispconfig, but not both.
     
  9. inside83

    inside83 Member

    Yes but please advise me on how to transfer the records to ISPconfig.
    I want to be able to add MX records and subdomains in ISPconfig, not in GoDaddy (or any other registrant).
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to set the primary and secondary dns server at godaddy to the addresses of your primary and secondary ispconfig dns servers.
     
  11. inside83

    inside83 Member

    So are the pictures from the 7th post correct?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Partly. It seems as if you have dns records at godaddy, so I assume that godaddy is your dns server and not the ispconfig server. I outlined that above. You can either have dns records at godaddy or zones in ispconfig, but not both at the same time.

    you can check easly if your ispconfig or godaddy server is responsible for the domain by going to intodns.com, it will show you the name of the authoritive dns server. If the name servers hown there are your ispconfig servers, then you have to add the records in ispconfig. If the servers shown there are from godadddy, the you have to add the records at godaddy and there shall be no dns zones in ispconfig at all.
     
  13. inside83

    inside83 Member

    Well, as far as i understood, I should create ns1 (pointing to ISPconfig #1) and ns2 (pointing to ISPconfig #2) A records using GoDaddy DNS manager.
    Then, ns1.mydomain.com and ns2.mydomain.com should be used when creating new DNS zone on ISPconfig #1 for mydomain.com.
    Afterwards, IP address of ISPconfig #1 server shoud be used when creating Secondary DNS zone for domain mydomain.com on ISPconfig #2, under "Allow zone transfers to these IPs".
    Finally, I can go to GoDaddy DNS manager and put ns1.mydomain.com and ns2.mydomain.com as nameservers for mydomain.com or any other domain I wish to manage via ISPconfig.

    Am I getting it right?
     
    Last edited: Feb 4, 2015
  14. arkehost

    arkehost New Member HowtoForge Supporter

    Hi inside83,
    if you're going to setup your authorative dns server there are some first step that are not connected whether you use ispconfig or other panels or godaddy or other as registrars. When you have decided which domain(or domains) will be the used for your dns server (let's say mypersonaldns.ltd ) you have to setup a minimum of 2 servers acting as dns server (which panel is your choice, follow above install guidelines for ispc).
    then you create the zone in the server you have choose as ns master and add A records for the vary ns servers. next insert the ns records for that hostnames
    you should end up with something like this:
    NS ns1.mypersonaldns.ltd
    NS ns2.mypersonaldns.ltd
    ns1 in A ip
    ns2 in A ip2
    if you have other record for this domain add it
    test your zone, if ok, go to your registrar (Godaddy, enom, etc) follow instructions to register your authoritative name servers for your domain/domains. you will find a form to put in the ips or hostnames of new dns servers (ns1, ns2)
    wait for refresh and propagation. dig for your domain ns output.
    Now go on with your server panel following related infos to add new domains and records and give the new ones your newly created dns servers as name servers.
    Every time you will buy a new domain, you will tell your registrar which nameservers are authorative for it (your new ns1 and ns2)
    I see here is a tutorial exactly for ispconfig and godaddy: https://www.howtoforge.com/ispconfig_dns_godaddy
     
  15. inside83

    inside83 Member

    Thank you @till & @arkehost
    I just want to check this with you:
    On ISPconfig #1 I should always create DNS zone and on ISPconfig #2 I should only create Secondary DNS zone?
    Also, that tutorial is old and GoDaddy and ISPconfig interface are changed. I am not sure what to input under "NS (IP-address)" and "Allow zone transfers to these IPs (comma separated list)" when creating Secondary DNS zone.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes.

    The IP address of the primary nameserver.

    The IP address of the secondary nameserver.
     
  17. inside83

    inside83 Member

    @till
    Please help!
    Look ad the screenshots, I think I got everything.
    My domain is XYZ.COM and my ns servers are NS1.MYDOMAIN.COM and NS2.MYDOMAIN.COM
    ISPconfig 1.png ISPconfig 2.png GoDaddy DNS Manager.png ISPconfig 1 - websites.png ISPconfig 1 - DNS zone.png from mxtoolbox.com.png ping xyz.com.png
     
    Last edited: Feb 13, 2015
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    all fully qualified domain names in dns have to end with a dot.

    wrong: sub.domain.com
    right: sub.domain.com.

    if you forget the dot the the name of the zone is appended by bind, so sub.domain.com becomed sub.domain.com.domain.com then
     
  19. inside83

    inside83 Member

    Ok, I finally figured this DNS stuff. It was due to GoDaddy's very strange interface (at least to me) for adding NS's.
    But I still have a problem, please look at the screenshot #4 from my previous post.
    When I go to xyz.com it opens abc.com - very strange.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    This can have the following reasons:

    1) You mix * and IP addresses in sites. Apache does not support that, use either * for all sites that point to this IP or use the IP but dont mix.
    2) ensure that you have auto subdomain www enabled in the sites, when you want to reach the sites with ww as well.
    3) When you use IP addresses in websites and your server is not behind a router, then ensure that the IP in dns and the website matches.
    4) When your server is behind a router and you use ip addresses in websites, then make sure that you use the external IP address in dns and the inetrnal IP in the website settings.
     

Share This Page