Configuring DNS Hosts
The CipherTrust Manager allows the Admin users to specify local DNS host entries, which eliminates the need to remember the IP addresses. While specifying a hostname, its IP address is required so that CipherTrust Manager can connect directly to that address whenever its hostname is specified for any outbound connection such as SMTP and Syslog Server.
Multiple hostnames can be assigned to an IP address. To do so, you need to create multiple records.
Example
ksctl dnshosts create --name 'example.com' --ip '172.168.59.22'
ksctl dnshosts create --name 'example1.com' --ip '172.168.59.22'
In the above example, IP 172.168.59.22
is assigned to multiple hostnames.
Similarly, multiple IP addresses can be assigned to a hostname.
Example
ksctl dnshosts update --id 'example.com' --ips '172.168.59.22' --ips '172.168.12.22' --type 'host-record'
In the above example, multiple IPs are assigned to the example.com
hostname.
The DNS hostnames are unique in the system.
Note
Currently, local DNS-Host entries are not resolved while configuring SNMP and NTP servers.
The following operations can be performed:
Create/get/update/delete DNS record
List all DNS records
Creating DNS records
To create a DNS record, you need to define the following parameters:
name
- Hostname of the domain.ip
- Host IP. This field is deprecated. Therefore, it is recommended to useips
.ips
- Host IPs. You can provide single or multiple IPs if required.type
- Type of the DNS host record. Possible values are:address
(default) - supports domain redirection. For example, if a DNS entry for the domain "example.com" exists with an IP address, the subdomain "abc.example.com" will also be redirected to the same IP as defined for the "example.com".
For entries with multiple IPs, round-robin is not supported. For example, if a DNS record is created with multiple IPs, only a specific IP will be returned every time during the domain name resolution process.host-record
- supports round-robin over multiple IPs, but doesn't support domain redirection. Therefore, the resolution only takes place when there's an exact match for the specified hostname.
If you don't provide
type
explicitly, the default value (address
) is used.
Example 1
Syntax
ksctl dnshosts create --name <hostname> --ip <host-ip>
Request
ksctl dnshosts create --name 'example.com' --ip '52.82.16.43'
Response
{
"id": "fbc4530f-519b-4a74-b7a3-edaec53afe3c",
"uri": "kylo:kylo:solo:dns:fbc4530f-519b-4a74-b7a3-edaec53afe3c",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-10T08:18:35.455866Z",
"name": "example.com",
"ip": "52.82.16.43",
"type": "address",
"updatedAt": "2023-05-10T08:18:35.455866Z"
}
In the above example, the default type
that is address
is returned in the response.
Example 2 (type
set to address
)
Request
ksctl dnshosts create --id 'example.com' --ips '172.168.59.22' --type 'address'
Response
{
"id": "c77e2053-8a00-4c84-b437-d3516b3907aa",
"uri": "kylo:kylo:solo:dns:c77e2053-8a00-4c84-b437-d3516b3907aa",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-10T08:15:56.873007Z",
"name": "example.com",
"ips": [
"172.168.59.22"
],
"type": "address",
"updatedAt": "2023-05-10T08:17:10.253454Z"
}
Example 3 (type
set to host-record
)
Request
ksctl dnshosts create --name 'example.com' --ips '172.168.59.22' --ips '172.168.12.22' --type 'host-record'
Response
{
"id": "c77e2053-8a00-4c84-b437-d3516b3907aa",
"uri": "kylo:kylo:solo:dns:c77e2053-8a00-4c84-b437-d3516b3907aa",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-10T08:15:56.873007Z",
"name": "example.com",
"ips": [
"172.168.59.22",
"172.168.12.22"
],
"type": "host-record",
"updatedAt": "2023-05-10T08:15:56.873007Z"
}
Getting details of DNS records
To get details of a DNS record, run:
Request
ksctl dnshosts get --id example.com
Response
{
"id": "c77e2053-8a00-4c84-b437-d3516b3907aa",
"uri": "kylo:kylo:solo:dns:c77e2053-8a00-4c84-b437-d3516b3907aa",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-10T08:15:56.873007Z",
"name": "example.com",
"ips": [
"172.168.59.22",
"172.168.12.22"
],
"type": "host-record",
"updatedAt": "2023-05-10T08:17:10.253454Z"
}
Updating DNS records
To update a DNS record, run:
Request
ksctl dnshosts update --id "example.com" --ips '52.63.25.46' --ips '172.34.12.62'
Response
{
"id": "b0da914e-3c80-4d29-8f84-35b8384955be",
"uri": "kylo:kylo:solo:dns:b0da914e-3c80-4d29-8f84-35b8384955be",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-11T08:20:48.823011Z",
"name": "example.com",
"ips": [
"52.63.25.46",
"172.34.12.62"
],
"type": "host-record",
"updatedAt": "2023-05-11T08:24:56.419976Z"
}
Getting list of DNS records
To get a list of all DNS records, run:
Request
ksctl dnshosts list
Response
{
"skip": 0,
"limit": 10,
"total": 2,
"resources": [
{
"id": "55a7e5d6-c1e1-40ba-a471-cfc32b700e31",
"uri": "kylo:kylo:solo:dns:55a7e5d6-c1e1-40ba-a471-cfc32b700e31",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-11T08:22:31.025336Z",
"name": "sample.com",
"ip": "52.23.98.120",
"type": "address",
"updatedAt": "2023-05-11T08:22:31.025336Z"
},
{
"id": "b0da914e-3c80-4d29-8f84-35b8384955be",
"uri": "kylo:kylo:solo:dns:b0da914e-3c80-4d29-8f84-35b8384955be",
"account": "kylo:kylo:admin:accounts:kylo",
"application": "ncryptify:gemalto:admin:apps:kylo",
"devAccount": "ncryptify:gemalto:admin:accounts:gemalto",
"createdAt": "2023-05-11T08:20:48.823011Z",
"name": "example.com",
"ips": [
"173.52.23.124",
"52.12.25.23"
],
"type": "host-record",
"updatedAt": "2023-05-11T08:20:48.823011Z"
}
]
}
Deleting DNS records
To delete a DNS record, run:
Request
ksctl dnshosts delete --id 'example.com'
There will be no response if DNS record is deleted successfully.