Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated using 4PSA automated script


Excerpt

This script allows you to create a new DNS zone for the selected client, update the name, type (master|slave) or status (enabled|disabled) for the DNS zone, or remove it.

Usage

Shell

zone.sh <command> <zone_name> <options>

Where <command> is one of:


Argument

Parameter

Description

--create or -c

<zone_name>

creates a new zone

--update or -u

<zone_name>

updates an existing zone

--remove or -r

<zone_name>

removes an existing zone

--info or -i

<zone_name>

retrieves zone information

and <options> are are:

Argument

Parameter

Description

--user or -s

<user_login>

use <user_login> to create the zone under their account

--from_template or -t

<template_name>

use <template_name> client template to create the zone

--from_template_global or -g

<template_name>

use <template_name> global template to create the zone

--template_ip or -ip

<IP> use

<IP> in the template to create the zone (if it is required)

--zone_type or -y

<slave|master>

creates a zone of a specified type

--zone_status or -st

<0|1>

zone status (0 is disabled, 1 is enabled)

--arpa_separator or -sp

<- | />

reverse zone separator - applies on 24 bits zones

Examples

In these examples, you are logged in as root and you call the scripts by their directory.

...

Simple Add DNS Zone Example

Shell
/usr/local/dnsmanager/bin/zone.sh --create "0/25.3.6.6.IN-ADDR.ARPA." --user newclient --zone_type master

Add DNS Zone Using Global Templates Example

Shell
/usr/local/dnsmanager/bin/zone.sh --create "foo.bar." --user newclient --zone_type master --from_template_global "BasicDNS" --template_ip "123.123.123.123"

Change Zone Settings

Shell
/usr/local/dnsmanager/bin/zone.sh --update "foo.bar." --zone_type slave

Get Zone Details

Shell
/usr/local/dnsmanager/bin/zone.sh --info "foo.bar."

returns an answer like this:

Shell
DNS Zone name:[foo.bar.]

...

DNS Zone type:[Slave/Forward]

...

Zone status:[enabled]

...

Login:[newclient]


Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.