DNS Server Setup

Discussion in 'IT & Internet' started by Paul Kelly ICHYB, Jan 16, 2021.

  1. Paul Kelly ICHYB

    Paul Kelly ICHYB Moderator
    Verified Business ✔️

    6,179 914
    I have been running a (CPanel) server with my own DNS servers (on the same hardware) for several years. Domain provider automatically sets new domains to my servers DNS, so set up is easy and pain free.

    I want to set up another server to host some domains/sites but do not understand how my DNS servers work with the second server. Do I have to set up a secondary DNS server settings or can server 2 get DNS from server 1?

    I hope this makes sense!
     
    Posted: Jan 16, 2021 By: Paul Kelly ICHYB Member since: Jan 21, 2008
    #1
  2. ServWise

    ServWise Full Member

    1,221 269
    If both will be running cpanel then you can easily set up one or both as slave DNS servers for the other (It is a good idea to have DNS servers on separate servers anyway and even better to have them geographically separated if you can). In whmcs look into the DNS cluster page for more info.
     
    Posted: Jan 16, 2021 By: ServWise Member since: Jan 22, 2008
    #2
  3. KM-Tiger

    KM-Tiger Verified Business ✔️

    10,148 2,775
    Yes it can, though both servers need to be configured accordingly.
     
    Posted: Jan 16, 2021 By: KM-Tiger Member since: Aug 10, 2003
    #3
  4. Paul Kelly ICHYB

    Paul Kelly ICHYB Moderator
    Verified Business ✔️

    6,179 914
    Wow, thanks for those 2 fast, great responses.

    I am looking at using ISPconfig i/o CPanel on the second server.

    Is it as simple as creating DNS records/zones on server 2, pointing to the CPanel DNS IP's?
     
    Posted: Jan 16, 2021 By: Paul Kelly ICHYB Member since: Jan 21, 2008
    #4
  5. ServWise

    ServWise Full Member

    1,221 269
    Yes, but you also have to add the domains to the cpanel server and have it configured for the correct DNS for your ISPconfig server. A much more manual process but perfectly doable.

    EDIT: in my previous post it should have read WHM not WHMCS
     
    Last edited: Jan 16, 2021
    Posted: Jan 16, 2021 By: ServWise Member since: Jan 22, 2008
    #5
  6. forevergroup

    forevergroup Full Member

    97 12
    There is no reason that I can see why your existing nameserver configuration cannot provide DNS for any quantity of additional/other external servers. It's just an A record.

    In fact, having a domain nameserver host that is external to your web servers is doubtless a far more common configuration than self-hosting that service on the same hardware as the server itself.

    The main challenge you're going to have is that DNS (and therefore site) availability for the second server is now going to be beholden to the first. Any maintenance e.g. Linux patch/reboot/update of the first server or web solution will knock out DNS resolution for the new, second server. So you'll need to plan for them both to be offline which may or may not be acceptable.

    Bear in mind that depending on your requirements actual website provision is a very small proportion of what a DNS nameserver is equipped to provide. For example, if we lost DNS for customer-hosted websites every time we completed maintenance on their website hosting software or linux server, and this also affected email and other systems, we'd be for the chop.

    What you may consider doing as a more resilient and scalable solution is looking at migrating nameserver provision to an external nameserver / DNS solution such as Cloudflare. This is perhaps more scalable now that you have two servers and removes either server from the responsibility and also provides paths to substantial further utility in future.

    I hope this helps...

    Edit: I’ve seen from a couple of other posters that cPanel does offer clustering which I wasn’t aware of (don’t use it myself) and addresses some of these concerns. However, depending on the location(s) of these servers, the network backbone of the provider, and the locations of the intended visitors for the sites in question, you may still wish to consider an external service. At least you have multiple options!
     
    Last edited: Jan 16, 2021
    Posted: Jan 16, 2021 By: forevergroup Member since: Sep 12, 2020
    #6
  7. ServWise

    ServWise Full Member

    1,221 269
    Another thing to consider is installing the cpanel DNSonly install (which is free) acting as a slave to your main cpanel, this way you have DNS redundancy.
     
    Posted: Jan 16, 2021 By: ServWise Member since: Jan 22, 2008
    #7
  8. fc-ramon

    fc-ramon UKBF Contributor

    77 16
    I've never setup DNS on cpanel like you are asking but I wanted to piggyback off what other people have said, which is to ensure its redundant and up pretty much all the time either using cloudflare, cpanel DNSonly or another solution. I use cloudflare (both free and paid plans) and I must say its great.
     
    Posted: Jan 16, 2021 By: fc-ramon Member since: Nov 6, 2020
    #8
  9. Dynumo

    Dynumo UKBF Contributor

    129 14
    Why not use Cloudflare for your dns? You can also make use of their free CDN capabilities and speed up your site via local cached versions nearer to your web visitors. You can transfer domains to them as well to renew at cost price.

    Your server will likely have an IP address. Now, depending on setup, each site on it will either use that IP address but be directed by your servers virtual host/NAT. Or, your system might provision IP addresses for each site you create. It is provider dependent.

    The former is the most likely. In such a case, you would just set the A record on whatever dns service for your domain to the IP address of the server it is on.
     
    Last edited: Jan 23, 2021
    Posted: Jan 23, 2021 By: Dynumo Member since: Jan 18, 2009
    #9
  10. Paul Kelly ICHYB

    Paul Kelly ICHYB Moderator
    Verified Business ✔️

    6,179 914
    @Dynumo Thanks for that idea. For this project that might work. Most of the sites hosted on the server will be one or two pages, so not that resource heavy, but Cloudflare could be a selling point!

    I will need to work out how to configure things based on 30-40 existing domains on my current server, new domains on the new server and auto-configuration, though!
     
    Posted: Jan 25, 2021 By: Paul Kelly ICHYB Member since: Jan 21, 2008
    #10