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.

AWS - IP Address and DNS Settings on new accounts

Discussion in 'Bind / DNS / Nameserver Issues' started by Mister9, Oct 1, 2015.

  1. Mister9

    Mister9 Member

    Joined:
    Apr 28, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi!
    I have another issue that I hope someone can help clarify for me. This one is bit detailed.

    I have (hopefully) successfully set up Cpanel on AWS with clustering following the instructions: https://blog.cpanel.com/part-1-how-i-built-a-cpanel-hosting-environment-on-amazon-aws/

    Before I set up this new Cpanel installation on AWS, I have been using CPanel/WHM on a dedicated server for a few years now. My issues comes from how new accounts are set up differently on a dedicated server vs this new AWS way.

    My first issue:
    When I use to create a new account on my dedicated WHM, I was provided IP Addresses from the server farm that I was able to use on newly created accounts. Once assigned to a new account, I can access the site with either the IP or the domain name. Now with this new AWS way, there is no info in the tutorials about how I obtain new IP Addresses. I tried adding a new local IP like 10.0.0.30 (because it says it's in NAT mode and use local IP) and assigning this as a dedicated IP to the newly created accounts but I don't understand how anybody can access the site through that IP since its a local IP. So how do I access the domain through custom IP and domain like I did before? I must be missing something fundamental.

    My second issue:
    On my dedicated WHM after I created a new account, I would typically go to DNS Functions -> Edit DNS Zone and edit the zone to customize my nameserver as so:

    mynewdomain.com
    ns1.mynewdomain.com
    ns2.mynewdomain.com

    anothersite.com
    ns1.anothersite.com
    ns2.anothersite.com

    thirdsite.com
    ns1.thirdsite.com
    ns2.thirdsite.com

    and then in my register I would add these custom nameservers into the register and point them to the dedicated IPs of each domain. But now with AWS way, the only way I could think of setting this up was to use the new cluster nameservers as the nameserver for ALL accounts in this new WHM installation.

    Like this:

    mynewdomain.com
    ns1.awsnameserver.com
    ns2.awsnameserver.com

    anothersite.com
    ns1.awsnameserver.com
    ns2.awsnameserver.com

    thirdsite.com
    ns1.awsnameserver.com
    ns2.awsnameserver.com

    Is this the correct / the only way I can set up accounts now through this set up?
    Is there a way to have custom nameservers names like I did in dedicated WHM?
     
    #1 Mister9, Oct 1, 2015
    Last edited: Oct 1, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,711
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The internal IP address is utilized in the server configuration files, but the use of 1:1 NAT should allow you to access the corresponding public IP address for that local IP address automatically.

    You should be able to add the custom name servers at the domain registrar the same way you did on previous servers. Simply ensure the "A" records are added for those name servers on the server that handles the DNS for the domain name the name servers are associated with.

    Thank you.
     
  3. Mister9

    Mister9 Member

    Joined:
    Apr 28, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi! Thank you for the info.
    Ok so if I set the local IP of one account to 10.0.0.30 what will be the public IP address be? Do I obtain a new elastic IP and point that somehow to WHM to link to the local IP? I do not want to reuse the same main server public IP for each of the accounts. I want a unique custom public IP for each account. Also so I can set up SSL for accounts that may need it.

    I'm sorry but I don't understand what you mean here. I have two nameservers set with dnsonly cluster set up. Each nameserver has a hostname ns1.awsnameserver.com and ns2.awsnameserver.com respectively. If I do

    thirdsite.com
    ns1.thirdsite.com
    ns2.thirdsite.com

    How do I get those custom nameservers to route through my cluster nameservers s1.awsnameserver.com and ns2.awsnameserver.com?

    My apologies if there is an obvious answer. I'm so lost.
     
  4. Mister9

    Mister9 Member

    Joined:
    Apr 28, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ok! I was finally able to figure out a solution to my first issue.
    I will post my solution just in case it may help anybody else that come across the same problem.

    What I first did was assigned a new private IP address to the Network Interface that was attached to my Web Server. Once assigned I obtained a new Elastic IP address. I then associated this to the Network Interface & Private IP that I just created.
    (I looked into assigning the new Private IP address to the instance itself however I did not go this route because I was afraid my main web server Elastic IP will be removed/overwritten when you try to allocated another elastic IP address to the same instance. Maybe this is possible, however I didn't try it.)

    Then in WHM I added the private IP address to the pool.
    (IP Functions > Add a New IP Address)

    Once this is done I was able to view the new Local IP (Private IP) mapped correctly to the Public IP (elastic IP) in current IP Addresses.
    (IP Functions > Show or Delete Current IP Addresses)

    I was then able to use it as a dedicated IP in creating a new account in WHM.
    So now the new website loads by elastic IP and by the domain name. I'm assuming now I will be able to assign a custom SSL certificate to this new IP.

    *I should mention that I was so happy that it worked that I went crazy and started to assign elastic IPs to private IPs hoping to create a giant list of Dedicated IPs for availability but I was disturbingly capped at 5 Elastic IPs. So considering I had 3 Elastic IPs used for my two DNSONLY instances and my one web server, I only have two available elastic IPs left I can use for dedicated IP Addresses in WHM.

    Maybe there is a way around this...
    I will post an update if I figure something out..
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,711
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You can simply create ns1.thirdsite.com and ns2.thirdsite.com at the domain registrar of thirdsite.com and use the same IP addresses that you use for s1.awsnameserver.com and ns2.awsnameserver.com when doing so.

    Thank you.
     
  6. Mister9

    Mister9 Member

    Joined:
    Apr 28, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Ahh! Thank you Michael!
    I appreciate it!
     
  7. Mister9

    Mister9 Member

    Joined:
    Apr 28, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,711
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  9. latindigitalboy

    latindigitalboy Registered

    Joined:
    Sep 13, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Colombia
    cPanel Access Level:
    Root Administrator
    THANK YOU SO MUCH!!

    so we only need to assing another elastic ip to the VCP right??

    and then we can use both public ip to create the nameservers right bro?


    NS1.DOMAIN.COM ->PUBLIC ELASTIC IP
    NS2.DOMAIN.COM ->another PUBLIC ELASTIC IP
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,711
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, elastic IP addresses do not change so they are suitable for use with your name servers. Ensure you update the name server IP addresses at the domain registrar for the domain name.

    Thank you.
     
Loading...

Share This Page