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.

New User Questions

Discussion in 'General Discussion' started by dcmeyer, Jul 10, 2009.

  1. dcmeyer

    dcmeyer Member

    Joined:
    Jul 10, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I am a Rackshack (now The Planet) customer and I just upgraded to a new box with cpanel (from outdated Plesk). They set up the hostname on the new box with the same domain I'm using on the old box. The hostname defaults to "domainnamecom.theplanet.host". When I try to change it to "something.domainname.com" it wont let me. Says hostname A entry missing.

    There are A records in place for this domain in orbit admin for the servers that have the ip of the old box wich is still online.

    I have to migrate all this over.


    Question:

    Do I set up a user account under root with the main domain and then do the additional ones as addon domains?

    Confused.
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    DNS can be a confusing issue indeed.

    It sounds like that you host your domain's DNS services outside of
    your server (and not otherwise in a cluster) if I understand your message
    correctly which if that is the case is a bad idea because local zone information
    overrides remote zone information and the server will automatically setup a
    small zone with your hostname information.

    Generally speaking what I do on most servers is setup the server to allow
    "Sharing of DNS server IPs" (Tweak Settings in WHM) and then take
    2 of the IP addresses on the server (usually the main shared IP plus another)
    to also use as DNS server addresses. If I have the choice of a non
    sequential IP or an IP on a different subnet available for the second IP,
    I choose that for other reasons that become obvious if you ever
    do DNS analysis checks so that the IPs don't appear to be from the
    same server. If the new server is part of a cluster, I'll setup the second
    IP on the other server but that is beyond the scope of this message.

    The server will create a zone automatically for the hostname as
    "/var/named/(hostname.domain.com).db". I generally ignore
    this and go ahead and manually add the zone for my main domain name
    to the server. If I am going to host a site with the main domain then
    I'll do this by adding a hosting account with the main domain or I'll just
    add the DNS zone alone for the main domain used for the hostname alone
    as a new zone if I am not going to host a site with that domain.

    Once the zone is added by either means, I will go in and edit the zone
    either through "Edit a DNS Zone" in WHM or login to the SSH shell and
    go to /var/named and edit the (domain.com).db zone file directly.

    Changes made:

    1. I increment the serial number to a higher number usually based
    on the current date such as "2009071101" which makes sure my
    changes are picked up by the rest of the world quickly.

    2. I'll add the DNS servers I am going to create to be used by the
    domain at the top of the zone file:
    Code:
    mydomain.com. 14400 IN NS ns1.mydomain.com.
    mydomain.com. 14400 IN NS ns2.mydomain.com.
    
    3. Further down the same zone file, I'll add the "A" records for those
    DNS servers plus an "A" record for my server hostname where my
    IP addresses selected earlier would be x.x.x.x and y.y.y.y respectively:
    Code:
    mydomain.com. IN A x.x.x.x
    
    ns1.mydomain.com. IN A x.x.x.x
    ns2.mydomain.com. IN A y.y.y.y
    
    hostname.mydomain.com IN A x.x.x.x
    
    4. I then generally add the usual entries for www, ftp, mail, etc
    below those entries and make sure my MX records are correct.

    5. I then usuall add a basic SPF record for the domain so
    that mail servers with SPF checking will accept mail from
    my server (most mail servers out there these days):
    Code:
    mydomain.com. IN TXT "v=spf1 ip4:x.x.x.x a mx mx:hostname.mydomain.com ~all"
    
    6. I save the domain zone and restart my DNS server.
    Code:
    # service named restart
    # service named status
    
    7. The next step is to go out to the registrar where you purchased your
    domain name and register the new hosts (DNS servers) as the same
    names and IP addresses as what I put in the zone file and then change
    the domain to actually use these new DNS servers as the main active
    DNS servers for the domain name.

    8. I then contact my upstream provider (if applicable) or whoever it is
    who holds the ARIN registration on the IP number itself and ask them
    to put in a reverse (PTR) record in there own DNS records to point the
    IP address back to my server's hostname. This is an important
    requirement so your mail works properly and cannot be done on your
    own server unless you actually are the IP address owner directly and
    the IP addresses are NOT given to you by your server provider.

    Beyond that, I just fill out the information Cpanel needs regarding the
    nameservers in the basic cpanel setup, resolvers, related configs, etc
    so that Cpanel knows to use my new DNS hosts with the server for
    all domains added to the server.

    At this point, your DNS should be up and running well and any sites you
    add to the server can just use the new DNS servers you created as
    the main authoritative DNS servers for those domains.
     
    #2 Spiral, Jul 11, 2009
    Last edited: Jul 11, 2009
  3. dcmeyer

    dcmeyer Member

    Joined:
    Jul 10, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thank You.. but

    Spiral,

    I understand most of what you are saying but right now that is a little overwhelming. I am under a huge time crunch. Once I get everything moved I will undertake what you suggest.

    For now I would like to get everything working as it was on the old box but I'm new to Cpanel and I need help understanding some things.

    My main domain is working without errors.

    When I try to addon a domain I get an error:

    Error from park wrapper: Using nameservers with the following IPs: 207.218.247.135,207.218.223.162 (which are my nameservers) Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

    The A records have been changed for this domain I am trying to addon to the new servers IP, and I know it has updated because the main domain has been updated with new A records in Orbit at the same time. But it will not let me addon the domain.

    So my question is, can the addon (virtual) domains have the A records on the outside nameservers and still work with Cpanel like my old Plesk, or do I need a DNS server setup on the new server.?

    Also, what shoud I select in Cpanel for DNS, BIND, NSD or Diabled?

    Thanks in advance for any help you can offer.
     
    #3 dcmeyer, Jul 11, 2009
    Last edited: Jul 11, 2009
  4. dcmeyer

    dcmeyer Member

    Joined:
    Jul 10, 2009
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Problem Solved

    With a little help from tech support I found my answer.

    Not a new thing to most of you I'm sure but for a novice on DNS issues I would have never have found it without help.

    Creating/editing the file ips.remotedns with the nameser IP's and placing it in etc/ was the solution.

    When I asked how I could create, or find it in Cpanel to add the entry I was told it could not be done that way. He added the file for me in under a minute.

    Seems odd I was not told this until I asked specific question about how the DNS works, and also odd there is no way to create/edit this file in Cpanel.

    Thank You again for the help and I will try to learn more on using my own server for DNS.
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Sounds like you've got your server setup to reject setting up accounts
    where the domains aren't already fully registered and already pointing
    to your new server in advance of creating the accounts.

    All you need to do is just update a quick setting in your server ...

    Log into your WHM control panel and open "Tweak Settings" ...

    UNCHECK the following lines:
    Code:
    Allow Creation of Parked/Addon Domains that resolve to other servers (i.e. domain transfers) [This can be a major security problem. If you must have it enabled, be sure to not allow users to park common internet domains.]
    
    Code:
    Allow Creation of Parked/Addon Domains that are not registered	 
    When adding a new domain, automatically create A entries for the registered nameservers if they would be contained in the zone.
    And go ahead and add a check to the following if needed:
    Code:
    Prevent users from parking/adding on common internet domains. (i.e. hotmail.com, aol.com)
    Save the page and you should be good to go ....
     
    #5 Spiral, Jul 11, 2009
    Last edited: Jul 11, 2009
Loading...

Share This Page