Controller: /nodeworx/dns

Required Permissions

DNS

Action: defaultServers

Added in Version

4.7.0-339

Description

Set the default nameserver (NS) records for new domains.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ns1

string

No*

ns6.interworx.com

The first nameserver to be used for requesting zone data for a given zone. For redundancy, a second (though equally authoritative) nameserver is required.

ns2

string

No*

ns7.interworx.com

The second nameserver to be used for requesting zone data for a given zone. An optional (equally authoritative) third nameserver can be provided for additional redundancy.

ns3

string

No

Similar to the secondary nameserver, but it is only used if the primary and secondary server fail.

ns4

string

No

Additional DNS. These are not required, but provide additional DNS redundancy.

* indicates that it’s actually required, but probably already has a valid default value.

Action: export

Added in Version

4.10.0-440

Description

Updates the DNS records from the database.

Action: fail

Added in Version

4.7.0-339

Description

Magic function - test for failure mechanism.

Action: flush

Added in Version

4.8.0-393

Description

DNS flush service action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ip

struct (string)

No*

192.168.0.1, 192.168.0.3, 192.168.0.4, 192.168.0.5, 127.0.0.1

* indicates that it’s actually required, but probably already has a valid default value.

Action: install

Added in Version

4.8.3-414

Description

Installs a DNS server on IPs that don’t have one.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ip

struct (integer)

No

Action: isRunning

Added in Version

4.7.0-339

Description

Checks if the service is running or not.

Sample Output

array (
  'status' => 0,
  'payload' => true,
  'reply_code' => 205,
)

Action: isRunningOnNode

Added in Version

4.7.0-339

Description

Checks if the service is running on a specific node (Clustering only).

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: listDnsServices

Added in Version

4.8.0-393

Description

Lists information about DNS Services running.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 =>
    array (
      'ip' => '127.0.0.1',
      'status' => 'up',
      'type' => 'recursive',
    ),
    1 =>
    array (
      'ip' => '192.168.0.1',
      'status' => 'up',
      'type' => 'iterative',
    ),
    2 =>
    array (
      'ip' => '192.168.0.3',
      'status' => 'up',
      'type' => 'iterative',
    ),
  ),
  'reply_code' => 205,
)

Action: listGeneralName

Added in Version

4.7.0-339

Description

Lists the “normal” name - ie “web server” instead of “httpd”.

Sample Output

array (
  'status' => 0,
  'payload' => '##LG_DNS_SERVER##',
  'reply_code' => 205,
)

Action: listPortNumbers

Added in Version

4.7.0-339

Description

Lists a string of the port numbers that this service uses, comma-seperated.

Sample Output

array (
  'status' => 0,
  'payload' => '53',
  'reply_code' => 205,
)

Action: listPortNumbersArray

Added in Version

4.7.0-339

Description

Lists array of port numbers and ranges that this service uses.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 => 53,
  ),
  'reply_code' => 205,
)

Action: listRequiredPermissions

Added in Version

4.7.0-339

Description

Lists an array of permissions required to control the service.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    0 => 'DNS',
  ),
  'reply_code' => 205,
)

Action: listServiceInfo

Added in Version

4.7.0-339

Description

Lists the service name, ports, page, and status.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'id' => 'djbdns',
    'name' => '##LG_DNS_SERVER##',
    'ports' => '53',
    'page' => '/nodeworx/dns',
    'ctrl' => '/nodeworx/dns',
    'is_running' => 1,
  ),
  'reply_code' => 205,
)

Action: listServiceName

Added in Version

4.7.0-339

Description

Lists the service name - ie “httpd” instead of “web server”.

Sample Output

array (
  'status' => 0,
  'payload' => 'djbdns',
  'reply_code' => 205,
)

Action: listServicePage

Added in Version

4.7.0-339

Description

Lists the page that controls the service.

Sample Output

array (
  'status' => 0,
  'payload' => '/nodeworx/dns',
  'reply_code' => 205,
)

Action: listServiceStatus

Added in Version

4.7.0-339

Description

Lists information about DNS Services running.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    '192.168.0.3' =>
    array (
      'ip' => '192.168.0.3',
      'status' => 'up',
      'mapped' => true,
      'on_system' => true,
    ),
    '192.168.0.4' =>
    array (
      'ip' => '192.168.0.4',
      'status' => 'up',
      'mapped' => true,
      'on_system' => true,
    ),
    '192.168.0.5' =>
    array (
      'ip' => '192.168.0.5',
      'status' => 'up',
      'mapped' => true,
      'on_system' => true,
    ),
  ),
  'reply_code' => 205,
)

Action: listUnmappedIps

Added in Version

4.8.3-414

Description

Lists information about IPs that do not have DNS running.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
  ),
  'reply_code' => 205,
)

Action: queryDefaultServers

Added in Version

5.1.0-838

Description

Displays the information available to the action “defaultServers”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'ns1' => 'ns6.interworx.com',
    'ns2' => 'ns7.interworx.com',
    'ns3' => '',
    'ns4' => '',
    'ns5' => '',
    'ns6' => '',
    'ns7' => '',
    'ns8' => '',
    'ns9' => '',
    'ns10' => '',
    'ns11' => '',
    'ns12' => '',
    'ns13' => '',
    'ns14' => '',
    'ns15' => '',
    'ns16' => '',
    'ns17' => '',
    'ns18' => '',
    'ns19' => '',
    'ns20' => '',
    'ns21' => '',
    'ns22' => '',
    'ns23' => '',
    'ns24' => '',
    'ns25' => '',
    'ns26' => '',
    'ns27' => '',
  ),
  'reply_code' => 205,
)

Action: querySetSoaSerialFormat

Added in Version

5.1.0-838

Description

Displays the information available to the action “setSoaSerialFormat”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'mode' => 'unix',
    'update_all_zones' => NULL,
  ),
  'reply_code' => 205,
)

Action: queryZoneDefaults

Added in Version

5.1.0-838

Description

Displays the information available to the action “zoneDefaults”.

Sample Output

array (
  'status' => 0,
  'payload' =>
  array (
    'refresh' => '7200',
    'retry' => '300',
    'expire' => '1209600',
    'negative_ttl' => '10800',
    'enforce_rfc1912_cname' => '1',
  ),
  'reply_code' => 205,
)

Action: remove

Added in Version

4.8.0-393

Description

DNS remove service action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ip

struct (string)

No*

192.168.0.1, 192.168.0.3, 192.168.0.4, 192.168.0.5

* indicates that it’s actually required, but probably already has a valid default value.

Action: reroute

Added in Version

4.7.0-339

Description

Action to re-route from the current controller to a different one.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

controller

string

Yes

Index, Overview, Users, Lang, Apikey, Plugins, Twofactorauth, Notice, Siteworx, Shell, Packages, Backup, Import, Softaculous, Reseller, ResellerPackages, ResellerBandwidthhistory, Http, Phpextensions, Ftp, Sshd, MailMta, MailSmtp, MailSmtp2, MailSend, MailMda, MailMsa, MailDovecot, MailSpam, MailVirus, MailMailman, MailQueue, Mysql, MysqlRemote, MysqlPhpmyadmin, Dns, DnsZone, DnsRecord, DnsSync, Nfs, NfsExport, NfsMount, Health, Cron, Firewall, Ssl, Logs, Settings, Updates, Rrd, …

Action: restart

Added in Version

4.7.0-339

Description

DNS restart service action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ip

struct (string)

No

192.168.0.1, 192.168.0.3, 192.168.0.4, 192.168.0.5, 127.0.0.1

Action: restartOnNode

Added in Version

4.7.0-339

Description

Restarts the service on a specific node (Clustering only).

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: setSoaSerialFormat

Added in Version

4.8.0-393

Description

Set the DNS SOA Serial Format.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

mode

string

No*

unix, ymd

unix

update_all_zones

integer

No

1

* indicates that it’s actually required, but probably already has a valid default value.

Action: start

Added in Version

4.7.0-339

Description

DNS start service action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ip

struct (string)

No

192.168.0.1, 192.168.0.3, 192.168.0.4, 192.168.0.5, 127.0.0.1

Action: startOnNode

Added in Version

4.7.0-339

Description

Starts the service on a specific node (Clustering only).

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: stop

Added in Version

4.7.0-339

Description

DNS stop service action.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

ip

struct (string)

No

192.168.0.1, 192.168.0.3, 192.168.0.4, 192.168.0.5, 127.0.0.1

Action: stopOnNode

Added in Version

4.7.0-339

Description

Stops the service on a specific node (Clustering only).

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

node_id

string

No*

* indicates that it’s actually required, but probably already has a valid default value.

Action: win

Added in Version

4.7.0-339

Description

Magic function - test for testing success mechanism.

Action: zoneDefaults

Added in Version

4.7.0-339

Description

Update the default dns zone settings.

Input Parameters

Name

Type

Required?

Example Values

Default Values

Notes

refresh

integer

No*

7200

Sets the number of seconds that a slave will cache the record before re-checking the primary server. Recommended values are between 1200 (twenty minutes) and 43200 (twelve hours). - In Seconds

retry

integer

No*

300

Set the number of seconds to retry a refresh after the previous refresh attempt fails. Recommended values are between 180 (three minutes) and 900 (fifteen minutes). - In Seconds

expire

integer

No*

1209600

Set the number of seconds for refresh and retry attempts before the server will stop serving the zone. Per RFC 1912, recommended values are between 1209600 (two weeks) and 2419200 (four weeks). This value is only used by slave servers. - In Seconds

negative_ttl

integer

No*

10800

Time in seconds for negative answers (NXDOMAIN) from this zone. This field was redefined in 1998 by RFC2308. Suggested values are between 3600 (one hour) and 10800 (three hours). Values higher than 86400 (twenty-four hours) should be avoided. - In Seconds

enforce_rfc1912_cname

integer

No*

1, 0

1

RFC1912 states “A CNAME record is not allowed to coexist with any other data.” In certain circumstances, you MAY want to relax this restriction if you understand the ramifications.

* indicates that it’s actually required, but probably already has a valid default value.