22 Aug 2011

ISPConfig3 - Two NS records for a single IP on AWS EC2

One of my servers runs ISPConfig 3 for entry level client web hosting, which is fine for in-house and personal use. It offers a professional front end with the installation routine to get there superbly presented on HowToForge and covering all variants of Debian, Ubuntu, CentOS, Fedora and OpenSuSE.

Aside from problems with SSL certificate installations (...I'll never get that time back) there are a couple of other configurational nuances which are good to know about, and one of the main and most important (for any hosting platform) is the set up of NS servers/records, specifically in relation to Amazon EC2 for stand alone instances where a single Elastic (Static) IP (EIP) is used. It's best practice to run two name servers, and on a commercially active hosting platform you must, however in certain scenarios where self hosting and/or smaller operational requirements are the case it's viable to run x2 on the same IP, and here's how, it's actually quite simple and as ever is all about the 'A' records.

Basically you configure your DNS Zone (via the wizard) as normal, inputting the domain name, contact email and specifying x2 NS records, however once done, in order to resolve to your server IP, you need to add x2 extra A records for the corresponding NS entries. Checkout the example below and you'll see what I mean with A records for ns1 and ns1 created to point at the AWS Elastic IP for this particular EC2 instance.



















With the Zone in place you can then proceed to set up your (web) sites, ftp (users) plus email domain and accounts. Once done drop into your domain reg (I use 123-Reg) and point your TLD DNS at the x2 NS servers you have created, specify the EIP as the same for both and wait for resolution to do its thing.

Base documentation for ISPC covering the API, DNS basics, sites, email and users is available HERE.

No comments:

Post a Comment