Customizing default DNS

WARNING : NOT FOR BEGINNERS

Sentora include a first step to enable to customize default DNS that are created when you run Sentora DNS Manager for the first time on a new domain. Obviously, it works ONLY when you are hosting your nameservers within Sentora.

1) Run phpMyAdmin, login as root, open the database zpanel_core.

2) If you want to change default dns records only for a specific user, open the table x_accounts, search this user and note his UserID from column ac_id_pk.

3) Go to table x_dns_create. It contains all "templates" for default DNS records to be created, one row per record. Add the new records that you want.

Short rules:

  • If a user have one or more rows dedicated to him (with dc_acc_fk =UserID), only these rows are used to create his news DNS records,
  • else all "default" rows with dc_acc_fk = 0 are used.
    (This enable to replace default records by some new others for any user, as to add new records),
  • in the colum corresponding to "target" field (dc_target_vc), the token :IP: will be replaced by server IP and the token :DOMAIN: will be replaced by the domain name which is to be created.

 

-> If you want to add new default record for all users that do not have personal template record, insert new rows with dc_acc_fk = 0.
Fill all required columns depending of the record you want to setup. Look for columns required in Sentora DNS_Manager, or look in already defined rows.

-> if you want to change default records only for a specific user:

- DUPLICATE all default rows you want to maintain, while changing  dc_acc_fk from 0 to UserID, per example by running this SQL query in the phpmyadmin sql box:


INSERT x_dns_create

(dc_acc_fk, dc_type_vc, dc_host_vc, dc_ttl_in, dc_target_vc, dc_priority_in, dc_weight_in, dc_port_in)

SELECT UserID, dc_type_vc, dc_host_vc, dc_ttl_in, dc_target_vc, dc_priority_in, dc_weight_in, dc_port_in

FROM x_dns_create WHERE dc_acc_fk=0;

(Do not forget to replace UserID by its value!)

- Add new rows with dc_acc_fk = UserID

 

As soon as the template rows are setup, they will be used to create default records, no need to reload or refresh anything..

PenWant to help ? Click here to report mistake or to send complement to add.