Current time: 12-23-2024, 11:42 AM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Changing DNS template to have more NS servers per domain
Author Message
rsmithgs Offline
Junior Member
*

Posts: 176
Joined: Apr 2007
Reputation: 1
Post: #1
[HowTo] Changing DNS template to have more NS servers per domain
This quick howto goes through adding more Name Servers to the DNS template. When you create a new domain it will add more NS servers to the DNS record.

As usual, its a good idea to make a backup of the file we are about to change.

Quote: cp /etc/ispcp/bind/parts/db_e.tpl /etc/ispcp/bind/parts/db_e.tpl.old

Now edit the db_e.tpl file.

Quote: nano /etc/ispcp/bind/parts/db_e.tpl

By default your db_e.tpl file looks like this:

Quote:$TTL 12H
$ORIGIN {DMN_NAME}.
@ IN SOA ns1.{DMN_NAME}. postmaster.{DMN_NAME}. (
; dmn [{DMN_NAME}] timestamp entry BEGIN.
{TIMESTAMP} ; Serial
; dmn [{DMN_NAME}] timestamp entry END.
8H ; Refresh
15M ; Retry
4W ; Expire
3H ; Minimum TTL
)
IN NS ns1.{DMN_NAME}.
IN NS ns2.{DMN_NAME}.
IN MX 10 mail.{DMN_NAME}.

{DMN_NAME}. IN A {DMN_IP}
www IN A {DMN_IP}
{DMN_NAME}. IN TXT "v=spf1 a mx ip4:{DMN_IP} ~all"
localhost IN A 127.0.0.1
mail IN A {BASE_SERVER_IP}
ns1 IN A {BASE_SERVER_IP}
ns2 IN A {SECONDARY_DNS_IP}
; CNAME for mail transfer
imap IN CNAME mail
pop IN CNAME mail
pop3 IN CNAME mail
relay IN CNAME mail
smtp IN CNAME mail
; CNAME for web transfer
ftp IN CNAME www
; sub [{SUB_NAME}] entry BEGIN.
; sub [{SUB_NAME}] entry END.

Under line 14 where it says
Quote: IN NS ns2.{DMN_NAME}.
Add new lines for the Name Servers. i.e.
Quote: IN NS ns3.{DMN_NAME}.
IN NS ns4.{DMN_NAME}.
Now further down you will see:
Quote:ns1 IN A {BASE_SERVER_IP}
ns2 IN A {SECONDARY_DNS_IP}
Below the ns2 line, add new lines for your NameServers. i.e. if your nameservers 3 and 4 have IPs 1.2.3.5 and 1.2.3.6:
Quote:ns3 IN A 1.2.3.5
ns4 IN A 1.2.3.6

Now I like to use CNAMES for my Name Server entries incase the IP address of the Name Servers change it saves alot of hassle.

So I would change:

Quote:ns1 IN A {BASE_SERVER_IP}
ns2 IN A {SECONDARY_DNS_IP}

To something like:

Quote:ns1 IN A {BASE_SERVER_IP}
ns2 IN CNAME ns2.domain.co.uk
ns3 IN CNAME ns3.domain.co.uk
ns4 IN CNAME ns4.domain.co.uk

Any new domains you create now will have a record with the new nameservers in. For this change to effect previously created domains regenerate the config using the guide at http://www.isp-control.net/documentation...ate_config

And there is a Howto on building slave nameservers somewhere on this site I could can't remember where.

EDIT: The howto on building another nameserver is http://www.isp-control.net/documentation...nameserver

Please note I accept no responsibility for your setup breaking due to the use of this document. No warranty included.

Please note I'm able to use cname records because my dns for the domain my servers are on is hosted on seperate DNS servers to ISPCP
(This post was last modified: 11-25-2008 03:10 AM by BeNe.)
05-05-2008 06:18 PM
Find all posts by this user Quote this message in a reply
Yhetti Offline


Posts: 1
Joined: Jun 2008
Reputation: 0
Post: #2
RE: Changing DNS template to have more NS servers per domain
Is there a way to do this with variable expansion in ispcp.conf that won't break during upgrades? I don't like the idea of hardcoding the the tertiary IP into the templates since it breaks configuration best practices etc etc bla bla.

Where does the variable expansion on ispcp.conf take place?
06-07-2008 03:09 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)