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.

cPanel DNS only

Discussion in 'Bind / DNS / Nameserver Issues' started by mistervlad, Aug 30, 2008.

  1. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I just finished installing this, and when i reboot, it fails on almost all the cPanel start ups.

    I installed CentOS 5.2, only selected a few of the options (mostly the server admin, programming languages etc..), named it: dns1.mydomain.com with the ip as my internal ip, 192.168.0.124 and the nameservers of my ISP.

    that went fine, made sure that i the /etc/resolv.conf set up, then installed the dnsonly shell script.

    that just finished (this was the second time, becuase i thought i messed up the frist time), and when i reboot, it fails all over the place.

    What am I doing wrong? I can't find a tutorial on how to install the dns, nor how to set it up properly...

    is there an update that i need to do? or any more setting that need to be done?

    Any help would be great, as I just got another server, with cpanel on it, and i want to set that one up as the primary dns server, and then set up the one here in my office as the secondary (yes i have a static IP, with a decent ammount of bandwidth), and i would like to have them all set up and working before i transfer.
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    After a basic install it should work, I have installed the DNS a dozen times with no problems.

    Basically we....

    However I do not think cPanel is designed to run as with a private IP like you have it, but I could be wrong.
     
  3. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Funny, I was just messing with it earlier, and i thought, what if i do: http://192.168.0.124:2086 (i was tryin /whm) and it worked!

    Now, the question I have (i've never run my own DNS before), is how do i set it up to work?

    My server that I have is cPanel, and i am now running cPanel dns only off my server here at the office (for now it is running internally, it will it's own IP address, and on an external IP the end of this week, or early next), the settings say under the 'Show or Delete Current IP Addresses' tab that the ip's are:
    192.168.0.124
    xxx.xxx.xxx.xxx Remove <- this is my external IP address

    is this all I need? or do I need to set up DNS Clustering? (again, this is my first crack at running my own DNS, i am sick using the free ones, and i want to have it more personalized to my domain) and in the dns clustering i should put the IP of my server? or should i not run DNS off the cpanel web server, and run 2 dns servers (one in my office, and one at another remote site)?

    Just tryin to figure out what to do now... :S I suppose I could make the one in my office the primary DNS, and the cpanel webserver act as the secondary? would that make sense?


    all help is greatly appreciated :)
     
  4. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Once you get your ext ip then you will have to setup clustering but I do not think it will work until you get the ext IP
     
  5. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I have an external IP, static.

    Now, as I asked in my last post, should I make my webserver the primary DNS, and my DNS ONLY server my secondary? or the other way around, or does it really matter?

    I have a few IP addresses on my webserver, so I can use a dedicated IP address for the DNS on that machine, but how do I go about setting that up? and how do I set up my machine here in my office??
     
  6. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Hi,

    Thats the way we have done it, we actually use 4 ips.

    ns1 and ns 3 primary machine
    ns2 and ns4 secondary machine

    Go to WHM >> Service Configuration >> Nameserver Setup
    Follow the instructions to change the setup go to
    WHM >> Networking Setup >> Nameserver IPs

    Good luck
     
  7. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Ok that's great... but my question now is, is how do i set up the inital dns?

    ns1.mydomain.com and ns2.mydomain.com

    i dont quite 100% understand how it will initally get set up, do i point mydomain.com to the ip addresses that i will be using? and then the rest get pointed to ns1 and ns2.mydomain.com?

    it's one of those chicken and the egf questions to me... i've never fully understood it... but i need/want to learn how :)


    also, you said you are running 4 name servers, and ns1 and ns3 are on the webserver, and ns2 and ns4 are on the other server, how is that set up?

    and by the way... i REALLY appreciate the help :)
     
  8. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    another quick question... how can i set up my FQDN on the server? should it be a different name?

    Should I use a free dns service (like zoneedit) for the inital setup? or will it work to use something else?
     
  9. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    let me maybe clear that up a little....


    can i name the server: server.mydomain.com

    and then the dns's as:
    ns1.mydomain.com -> ipaddress1 (different from the webserver ip)
    ns2.mydomain.com -> ipaddress2 (ip address assigned at my office_

    and then mydomain.com from my registar would point to the dns to:
    ipaddress1
    ipaddress2

    and then, for every other domain that i would host, i would just give them the dns servers to assign as:
    ns1.mydomain.com
    ns2.mydomain.com


    am I going correct so far??
    but i still dont understand how i can set up the FQDN on the server, if the DNS is running on that server as well as a dns server in my office... maybe i am just overthinking it...
     
    #9 mistervlad, Sep 1, 2008
    Last edited: Sep 1, 2008
  10. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Yes, I like to be a little more creative :) Being from Oklahoma my servers are named sooner.domain.com, boomer.domain.com, redriver.domain.com, cherokee.domain.com etc... Mainly so it is easier to remember what is what, instead of server.domain.com and server2.domain.com. We have used dallas.domain.com houston.domain.com etc...

    Yes, just add them to the registrar first, then to each cpanel, the full cpanel then the DNS only version, then cluster them together, decide if you want both to synchronize changes or as a standalone. If you make the DNS only not scyncronize then be sure to add a DNS zone for the ns2.yourdomain.com

    Yes, point ns1.mydomain.com to ipaddress1 and ns2.mydomain.com to ipaddress2

    Yes

    Once you get all the above done, use cPanel to set up the new domain (creat New Account) pointed to your nameservers and it will make the proper entries in the httpd.conf for the site to resolve. Then it should sync that to the DNS only server.
     
  11. takeover

    takeover Member

    Joined:
    Apr 29, 2003
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    just do the server name as ns1 (or whatever), and it is automatically done

    all the failures on startup are normal, because it uses the regular cpanel startup, but all of those programs are missing ... so you get things like apache failing because dns only does not use apache

    it usually takes me all of about 30 minutes to install centos and install dns only and it's basically ready to go right off the bat if you have the hostname set properly

    i don't really understand why you would assign multiple nameserver ip's to the same server ... the point of dns only is to have standalone nameservers, if you have 2 ip's on the same server it does absolutely nothing

    rhenderson's advice seems to be based on using regular cpanel, not dns only, considering his whm actions do not exist in dns only
     
    #11 takeover, Sep 1, 2008
    Last edited: Sep 1, 2008
  12. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    We have more than one nameserver to have a different namerserver IP for resellers than the standard one for the server.
     
  13. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    which server gets the `synronize changes` setting?

    currently, i have it set to the DNS ONLY machine (ns2) and ns1 (the main server) is set to standalone....

    is this correct, or do i have it backwards?
     
  14. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Good point. I had forgotten I manually set up the nameservers from shell. Thanks for the reminder
     
  15. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    On our main server when you click on the cluster we have it set to synchronize changes with the backup server.

    On the DNS only server when you click on cluster we have it set to standalone so it will not write any changes to the main server.

    But it depends on what you want.
     
  16. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    ok... 1 last question...

    how do i know it's working?

    I have played with http://www.kloth.net/services/dig.php and put in 'mydomain.com' and for the nameserver 'ns1.mydomain.com' and it came back fine... same with using 'ns2.mydomain.com'.

    but when i put in 'otherdomain.com' and 'ns1.mydomain.com' it comes back fine, but using 'ns2.mydomain.com' comes back unknown.

    as I said, it works fine with 'mydomain.com' on both ns1 and ns2, but the other domain only works on ns1, and not ns2.

    now i am stumped.

    it appears that it is working, but not syncing.


    I am getting my new internet service on the 16th, and my old server is being taken offline on the 4th of october, so I need/would like to have this resolved... maybe could it have been in the server install? when i restart bind, i see in the trail the ip: 127.0.0.1 being shown...


    here is the complete log: (altered to remove my domain name for the time being, not that anyone who has a clue can't figure out)
    Code:
    named started ok Sep 3 23:32:50 ns1 named[2477]
    client xxx.xxx.xxx.xxx#33253
    view external
    received notify for zone 'mydomain.com' Sep 3 23:37:49 ns1 named[2477]
    shutting down
    flushing changes Sep 3 23:37:49 ns1 named[2477]
    stopping command channel on 127.0.0.1#953 Sep 3 23:37:49 ns1 named[2477]
    no longer listening on 127.0.0.1#53 Sep 3 23:37:49 ns1 named[2477]
    no longer listening on 192.168.0.124#53 Sep 3 23:37:49 ns1 named[2477]
    exiting Sep 3 23:37:49 ns1 named[13848]
    starting BIND 9.3.4-P1 -u named Sep 3 23:37:49 ns1 named[13848]
    found 1 CPU, using 1 worker thread Sep 3 23:37:49 ns1 named[13848]
    loading configuration from '/etc/named.conf' Sep 3 23:37:49 ns1 named[13848]
    listening on IPv4 interface lo, 127.0.0.1#53 Sep 3 23:37:49 ns1 named[13848]
    listening on IPv4 interface eth0, 192.168.0.124#53 Sep 3 23:37:49 ns1 named[13848]
    /etc/named.conf:13
    using specific query-source port suppresses port randomization and can be insecure. Sep 3 23:37:49 ns1 named[13848]
    command channel listening on 127.0.0.1#953 Sep 3 23:37:49 ns1 named[13848]
    zone 0.in-addr.arpa/IN/localhost_resolver
    loaded serial 42 Sep 3 23:37:49 ns1 named[13848]
    zone 0.0.127.in-addr.arpa/IN/localhost_resolver
    loaded serial 1997022700 Sep 3 23:37:49 ns1 named[13848]
    zone 255.in-addr.arpa/IN/localhost_resolver
    loaded serial 42 Sep 3 23:37:49 ns1 named[13848]
    zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver
    loaded serial 1997022700 Sep 3 23:37:49 ns1 named[13848]
    zone localdomain/IN/localhost_resolver
    loaded serial 42 Sep 3 23:37:49 ns1 named[13848]
    zone localhost/IN/localhost_resolver
    loaded serial 42 Sep 3 23:37:49 ns1 named[13848]
    zone mydomain.com/IN/internal
    loaded serial 2008090202 Sep 3 23:37:49 ns1 named[13848]
    zone mydomain.com/IN/external
    loaded serial 2008090202 Sep 3 23:37:49 ns1 named[13848]
    running Sep 3 23:37:49 ns1 named[13848]
    zone mydomain.com/IN/internal
    sending notifies (serial 2008090202) Sep 3 23:37:49 ns1 named[13848]
    zone mydomain.com/IN/external
    sending notifies (serial 2008090202) Sep 3 23:37:49 ns1 named[13848]
    client xxx.xxx.xxx.xxx#33254
    view external
    received notify for zone 'mydomain.com'
    replaced my IP with 'xxx.xxx.xxx.xxx' and my domain name with 'mydomain.com'

    I have no idea what all this means, maybe someone can help me out
     
  17. mistervlad

    mistervlad Member

    Joined:
    Dec 1, 2007
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    OK, now that i have a FRESH install of the DNS only, and I have my domain name set up and pointing to the right nameserver ips with my registar... and my DNS only computer is running on it's own IP now, and there are no traces of that internal ip (the 192.168.x.x)... i when to my cpanel whm and set up the DNS clustering.

    here is exactly what I did.

    1) Enable Dns Clustering (that radio), then submit.
    2) Add a new server to the cluster (entered the IP of ns2), then configure.
    3) added the remote access key of user 'root' from the ns2 server
    4) confirmed DNS role on ns1 server as 'Syncronize changes' so that ns2 was being changed when ns1 was being updated.
    5) on NS2 server, enabled DNS clustering.
    6) ns2 was automagically set up to add ns1 (which is using the server name, not ns1) to the cluster, and it is set up to 'stand alone'.

    when i go to sync the dns on ns1 by pressing the 'Synchronize all zones to all servers' button under the 'Synchronize DNS Records' menu on the left, i get this message:
    Code:
    Syncing all zones..... . Done
    Bind reloading on server using rndc
    yet when i do it from the ns2, i get this:
    Code:
    Syncing all zones..... . Done
    Bind reloading on ns2 using rndc
    Error reloading bind on ns2: rndc: connect failed: 127.0.0.1#953: connection refused
    is this becuase ns2 is set to stand alone? if so, is this correct?

    and for my last question... how can i get a list of all the records on ns2, so that i can verify that it is actually syncing??
     
  18. markb14391

    markb14391 Well-Known Member

    Joined:
    Jun 9, 2008
    Messages:
    305
    Likes Received:
    2
    Trophy Points:
    18
    Hi,

    Unfortunately, cPanel DNS Only does not allow you to view the domains it is handling. You will have to look "under the hood" in your named.conf file (e.g., /etc/named.conf) to see if the domains are listed there.

    Also, note that the DNS clustering generally syncs changes but not the domains that were already being hosted. To sync all, use the "Sync All" command and the v1 method instead of v2.

    Mark
     
Loading...

Share This Page