server_dns.exe: DNS Zone Template
The server_dns.exe
utility is used to manage Plesk server's DNS zone template. Using this utility, you can perform the following tasks:
- adding resource records to or replacing already existing resource records with new ones in Plesk server's DNS zone template
- specifying the status to be set for a domain's DNS zone upon creation of a domain
- modifying SOA record for the DNS zone template
- setting Plesk name server DNS zone preferences regarding recursive DNS queries from different types of hosts
- managing the Access control list (ACL records)
Location
%plesk_cli%
Usage
server_dns.exe <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command adds the following two resource records to the domain DNS zone template, while removing all pre-existing resource records from the domain DNS zone template:
- new
MX
resource record <domain> specifying mail.<domain> as the mail exchanger for the record, and setting the mail exchanger's priority to 15. - new
NS
resource record <domain> setting domain ns.<domain> as the name server.server_dns.exe --set "MX,"",mail.<domain>,15;NS,"",ns.<domain>"
Commands
Command | Parameter | Description | Example |
---|---|---|---|
|
|
Adds a resource record to the Plesk server's DNS zone template. If a record already exists, the command returns code |
To add a server_dns.exe --add -mx "" -mailexchanger "mail.<domain>" -priority 35 or server_dns.exe -a -mx "" -mailexchanger "mail.<domain>" -priority 35 |
|
where
|
Adds specified resource records to and removes all pre-existing resource records from the Plesk server's DNS zone template. For more details, consult descriptions of the options in the following table for adding resource records of respective types individually. |
To add the following DNS zone template file to Plesk (for the presentation sake, we added the ".<domain>." part to hosts like "ns.<domain>." which normally are just "ns" in real zone files): HOSTRR typeVALUE <domain>.NSns.<domain>. ns.<domain>.A<ip> <domain>.A<ip> webmail.<domain>.A<ip> <domain>.MX10 mail.<domain>. mail.<domain>.A<ip> ftp.<domain>.CNAME<domain>. <ip>/24PTR<domain>. <domain>.TXTf1 +a +mx -all _SIP._tcp.megadomain.<domain>.SRV5 25 12 example.com. server_dns.exe --set "NS,,ns.<domain>.;A,ns,<ip>;A,,<ip>;A,webmail,<ip>;MX,,mail.<domain>.,10;A,mail,<ip>;CNAME,ftp,<domain>.;PTR,<ip>,,24;TXT,,v=spf1 +a +mx -all;SRV,_SIP._tcp.megadomain,example.com,5 25 12;" or server_dns.exe -s "NS,,ns.<domain>.;A,ns,<ip>;A,,<ip>;A,webmail,<ip>;MX,,mail.<domain>.,10;A,mail,<ip>;CNAME,ftp,<domain>.;PTR,<ip>,,24;TXT,,v=spf1 +a +mx -all;SRV,_SIP._tcp.megadomain,example.com,5 25 12;" |
|
|
Modifies the Plesk server's DNS server settings. |
To enable support for recursive DNS queries for hosts on the local network only: server_dns.exe -u -recursion localnets |
|
|
Modifies the SOA record in the Plesk server's DNS zone template. |
To set the TTL parameter to 5 hours for the SOA record for the DNS zone template: server_dns.exe --update-soa -soa-ttl 5H |
|
|
Displays the Plesk server's DNS server records. |
server_dns.exe --info |
|
|
Enables Plesk integration with a third-party DNS using the specified script for the integration. |
To switch on Plesk integration with a third-party DNS service: server_dns.exe |
|
|
Disables Plesk integration with a third-party DNS. |
To switch off Plesk integration with a third-party DNS service: server_dns.exe |
|
|
Displays help on the use of the utility. |
server_dns.exe --help or server_dns.exe -h |
Options
Option | Parameter | Description | Example |
---|---|---|---|
|
|
Sets the Plesk name server DNS zone preferences:
Used with the |
To enable support for recursive DNS queries for hosts on the local network only: server_dns.exe -u -recursion localnets |
|
|
Sets the status of a domain's DNS zone when the DNS zone is created upon the domain creation. Only newly created domains will inherit the DNS zone status. Used with the |
To disable domain DNS zones for newly created domains: server_dns.exe -u -status disabled |
|
|
Adds host or network IP addresses to the Access Control list (ACL). |
To add records 192.0.2.78 and 192.0.2.0/24 to the ACL: server_dns.exe -u -add-acl 192.0.2.78,192.0.2.0/24 |
|
|
Specifies the Used with the Requires the |
To add an server_dns.exe -a -a sample -ip "<ip>" |
|
|
Specifies the Used with the Requires the |
|
|
|
Specifies an IP address or a placeholder for a domain's IP address for creating an Used only with the |
|
|
|
Specifies the Used only with the Requires the |
To add an server_dns.exe -a -ns "" -nameserver "ns.<domain>" |
|
|
Specifies the name of a nameserver or a placeholder for creating an |
|
|
|
Specifies the Used with the Requires the |
To add an server_dns.exe -a -mx "" -mailexchanger "mail.<domain>" -priority 15
|
|
|
Specifies the name of a mailexchanger or a placeholder for creating an |
|
|
|
Specifies the mail exchanger priority for creating an |
|
|
|
Specifies the Used with the Requires concomitant use of the |
To add a server_dns.exe -a -cname subdom -canonical "<domain>"
|
|
|
Specifies a canonical name or a placeholder for creating a |
|
|
|
Specifies the Used with the Requires concomitant use of the |
To add a server_dns.exe -a -ptr "" -subnet "<ip>"/16 |
|
|
Specifies an IP address and a subnet mask or a placeholder for creating a PTR type DNS record in the Plesk server's DNS zone template. |
|
|
|
Specifies the SRV type resource record in the Plesk server's domain DNS zone template. Used with the Requires the use of options |
To add to the DNS zone template an SRV record for <domain> to handle SIP protocol connections, that will point to a server named sipserver.sample.com listening on TCP port 5060. The priority given here is 0, and the weight is 5: >server_dns.ee --add -srv '' -srv-service sip -srv-target-host sipserver.sample.com. -srv-protocol TCP -srv-port 5060 -srv-priority 0 -srv-weight 5 |
|
|
Specifies priority of the SRV record (0 - the highest, 50 - the lowest). |
|
|
|
Specifies relative weight of the SRV record among records with the same priority (0 - the lowest, 50 - the highest). |
|
|
|
Specifies the port on which the service is to be found (for SRV record). |
|
|
|
Specifies canonical hostname of the machine providing the service (for SRV record). |
|
|
|
Specifies the service protocol for SRV record. |
|
|
|
Specifies symbolic name of the service for SRV record. |
|
|
|
Specifies the Used with the Requires the |
To specify the server_dns.exe -a -txt "This record is used to implement the Senders Policy Framework and DomainKeys specifications" -domain subdom |
|
|
Specifies a subdomain name for creating a Used with the |
|
|
|
Specifies format of SOA record serial number: UNIX timestamp or recommended by IETF and RIPE. Used with the |
To change the SOA record serial format to recommended by IETF and RIPE in the domain DNS zone template: server_dns.exe --update-soa -soa-serial-format yyyymmddnn |
|
|
Specifies the TTL value for the SOA record in the Plesk server's DNS zone template. Used with the |
To set the TTL value to 5 hours, the Refresh value to 4 hours, the Retry value to 10 seconds, the Expire value to 2 weeks, and the Minimum value to 2 days for the SOA record in the domain DNS zone template: server_dns.exe --update-soa -soa-ttl 5H -soa-refresh 4H -soa-retry 10S -soa-expire 2W -soa-minimum 2D |
|
|
Specifies the Refresh value for the SOA record in the Plesk server's DNS zone template. Used with the |
|
|
|
Specifies the Retry value for the SOA record in the Plesk server's DNS zone template. Used with the |
|
|
|
Specifies the Expire value for the SOA record in the Plesk server's DNS zone template. Used with the |
|
|
|
Specifies the Minimum value for the SOA record in the Plesk server's DNS zone template. Used with the |