The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DNS in a 2nd non cpanel server

Discussion in 'Bind / DNS / Nameserver Issues' started by asmar, Jul 5, 2005.

  1. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Hello all,

    I was wondering if there is a way to have the DNS running from another server without cpanel on it. Just a plain OS installation with Bind.

    When a reseller add a new domain then is it possible somehow to communicate with the non cpanel dns and update the records?

    Any help is much appretiate.

    Thanks a lot
     
  2. lankyb

    lankyb Well-Known Member

    Joined:
    Sep 21, 2004
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Peterborough, UK
    cPanel has the option just to install DNS only, you can see for yourself here: http://layer1.cpanel.net/

    Here are some installation commands that should work. I simply adapted the main installation to the one needed to just install DNS Only:
    Code:
    mkdir /home/cpdnsonlyins
    cd /home/cpdnsonlyins
    wget http://layer1.cpanel.net/cpanel-universal-dnsonly-install.sea
    sh cpanel-universal-dnsonly-install.sea
    
     
  3. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Hi lankyb,

    This is not what I want. I am trying to avoid paying the extra license just to have the DNS.

    Thanks
     
  4. lankyb

    lankyb Well-Known Member

    Joined:
    Sep 21, 2004
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Peterborough, UK
  5. richy

    richy Well-Known Member

    Joined:
    Jun 30, 2003
    Messages:
    276
    Likes Received:
    1
    Trophy Points:
    16
    As far as I can tell, the "nameserver only" version of cPanel does not require licencing. However, it will only act as a "slave" nameserver - it does not have account creation, dns zone creation/modification etc etc.
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Indeed, it is free and as richy says, it is quite limited, but it does provide you with a slave DNS which automatically updates. Otherwise, you'll just have to go the traditional route with a DNS master/slave setup where you have to manually create the zone entries in named.conf on the slave, unless you do some scripting to copy over the master and reconfigure it as a slave.
     
  7. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    What about if I point ns1 to a US server and ns2 to a UK server and then by using rsync copy all the dns records to each one and reload bind every few minutes or hours?

    What I need to figure is how I will be able to add a new domain as a reseller for example under cpanel when in this cpanel server will not be enabled dns. Insteed it will be enabled only in the other 2 servers where both aren't use cpanel.

    Sorry to ask again but I am little bit confused. I want to avoid using cpanel at all in my DNS setup but have the ability for my clients to add/modify their domain details via cpanel.
    Am I asking too much? :rolleyes:

    Thanks in advance
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    There's no need to rsync the zone files as DNS will do that as part of a normal master/slave relationship (you should read up on how to set that up if you don't know - google is your friend there). The manual part, as I mentioned would be to add the actual zone entries to /etc/named.conf. You cannot simply just copy over a named.conf from the master to the slave, as you'll see when you check how to setup a master/slave nameserver relationship.
     
  9. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Thanks a lot Jonathan for your answer.
    What is anyway the ideal DNS setup if you have a few cpanel and many non cpanel servers?
    Any suggestions?

    Thanks
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    A lot depends on who controls the DNS entries. Since handling DNS in cPanel is so simple, if you have two DNS servers in separate NOCs, I'd be tempted to just cluster those two to handle all the DNS zones for all the domains on all servers.
     
  11. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16

    Should I have ns1 to point in server1 and ns2 to point in server2 or both in the same server and just cluster them?

    Thanks
     
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    ns1 points to one server, ns2 points to a different server, then cluster them and select the options to sync all zones between both servers.
     
  13. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    After a few more research here is what I finally think that it's best to do.

    set up ns1 as master with cpanel on it (VPS) - UK
    set up ns2 DNS ONLY VERSION on a 2nd VPS smaller - US

    My questions are:

    Will I be able to add the ns2 in the cluster and synchronize the records from there?
    As far as I know you don't have any panel in the DNS only version. Do I need just to point the ns2 (DNS only version) IP to the main master dns (ns1 vps and obviously in my registrar)?

    In case of a downtime in ns1 server, is it going to work the DNS only version and serve the requests from there?

    Thanks
     
  14. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Hi,

    1. I think that you may have to do that from the normal cPanel server, but I don't recall

    2. You have a WHM login on the DNS ONLY version with much reduced functionality

    3. Yes, you would need to change the IP addresses at your registrar for your nameservers pointing on to one servers IP and the other to the others servers IP. You would also need to update the zone file for the domain that the ns1/ns2 A records are on to point to the correct IP addresses

    4. Yes, if either nameserver becomes unavailable the other will be available to server DNS requests for your domains
     
  15. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    This DNS only version is going to freak me out....

    I've installed it ok but now I cannot find any script to generate the remote access key in order to add the server to the cluster.

    The setrhash script doesn't exist under /scripts and also no apache or port 2087 is available (nmap gives only bind's 53 port)

    You can get the Remote Access Key from
    https://domain:2087/scripts/setrhash
    or

    Any ideas?

    PS: I've just noticed that setrhash does not exist in any cpanel server via locate command. Where is the script that can produce the remote key?
     
    #15 asmar, Jul 8, 2005
    Last edited: Jul 8, 2005
  16. lankyb

    lankyb Well-Known Member

    Joined:
    Sep 21, 2004
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Peterborough, UK
    I do not know where the script is to generate the hash from DNS Only, none of my servers have that installed... but i have a suggestion.

    The access hash is stored here:

    Code:
     /root/.accesshash 
    See if a code has already been generated :)
     
  17. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    On the server run:

    netstat -lpn

    Ports 2086 and 2087 should be bound. If only 2086 is, then try connecting to the non-SSL port http://ip:2086

    If neither are bound, there's a problem ;)

    If either are bound but you cannot connect, you probably have a firewall running:

    /etc/init.d/iptables stop

    then try accessing again/
     
  18. asmar

    asmar Well-Known Member

    Joined:
    Jul 16, 2004
    Messages:
    135
    Likes Received:
    0
    Trophy Points:
    16
    Thanks a lot Jonathan, it was a fault installation. I did it again and now is working.
     
  19. clara

    clara Member

    Joined:
    Aug 31, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    My company is small ISP that has one DNS server, and I am trying to place our DNS as the master nameserver, ns2.domain.com as primary nameserver, and ns1.domain.name as secondary (or something else, I don't know what to put there). When I do this, Assign IP for primary or secondary ns gives me internal IP or one of added IPs. Now, how do I configure this?
     
  20. aeroweb

    aeroweb Well-Known Member

    Joined:
    Jun 4, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Currently I have a typical master/slave zone transfer configuration which works fine.

    There are 2 DNS servers running on 2 separate systems

    Server 1: Cpanel master DNS
    Server 2: Windows Bind slave DNS

    Server 2 (Windows) automatically updates its zones that are located in d:\dns\etc\named.conf with any changes that were made on server 2 (Cpanel).

    However, the zones must exist in d:\dns\etc\named.conf on server 2 (Windows) for it to be updated by the data on server 1 (Cpanel).

    For Example:
    When I create a new cpanel account on server 1, a new zone is created automatically in /etc/named.conf on the Cpanel server.

    If I want this zone to be added to server 2 (Windows) and I must first manually add the slave zone in d:\dns\etc\named.conf on server 2 (Windows).

    Then server 1 will keep the zones on server 2 up to date with any changes I make in Cpanel.

    This works great but I first need to manually modify named.conf on the Windows server every time I create a new Cpanel Account.

    I have read many posts both here and elsewhere pertaining to bind and I cannot seem to find a solid solution.

    I noticed that Cpanel has a DNS only release that allows you to do this automatically; however, I need server 2 to stay as a Windows system.

    Is there a way to configure Bind to make automatically changes in named.conf
    on the slave system?

    Others have suggested using scripts to perform these tasks but I could not locate any for my particula situation.

    There are a lot of posts pertaining to this issue of configuring a secondary redundant DNS server. I was hoping someone here has ran into the same problem and could offer their wisdom on how they overcame it?

    Thanks
     
Loading...

Share This Page