gtm forwarder-profile
The gtm forwarder-profile command manages the profiles that define to which upper servers the DNS service will forward the queries that remain outside its own zones. Its panel equivalent is the DNS Forwarder Profiles screen.
The profile comes into play by being assigned to a DNS service; as long as it is not assigned, it has no effect.
Command Summary
Required Fields
| Order | Field | Status | Value |
|---|---|---|---|
| 1 | name | Required | The name of the profile |
| 2 | addresses | Required | The upper DNS servers to which the queries will be forwarded |
The Upper Server Addresses
The addresses field carries more than one address. The addresses are written as a single value, with a space being put between them, and the whole of the value is taken inside double quotes.
Every address has to conform to one of the following formats; a domain name is not accepted:
| Format | Example |
|---|---|
| IPv4 | 8.8.8.8 |
| IPv4 and port | 8.8.8.8:5353 |
| IPv6 | 2001:db8::1 |
| IPv6 and port | [2001:db8::1]:5353 |
The writing with square brackets is used only together with a port.
Domain Name Based Forwarding
A rule is written for certain domain names being sent to different upper servers. Every rule takes its own index.
| Field | Value |
|---|---|
--domainBasedForwarding.0.domain | The domain name to which the rule will be applied; the subdomain names are covered as well |
--domainBasedForwarding.0.addresses | The upper server address to be used for this domain name |
The query is forwarded to the rule that matches with the longest suffix among the defined rules; if no rule matches, it goes to the default addresses.
Meta Data
| Field | What it does | What is written after it |
|---|---|---|
--metaData.N.key | Determines the key of the line that will be written directly into the resolver configuration | The key name; every pair with its own index |
--metaData.N.value | Determines the value of that key | The value text |
Assigning the Profile to the DNS Service
Examples
Updating and Deleting
Things to Know
- More than one address is a single value. The addresses are written not as separate fields but as a single value separated with a space, and are taken inside quotes.
- A domain name cannot be written. The upper servers are defined only with an IP address.
- The longest suffix wins. If more than one rule matches, the most specific one is applied.
- It does not run without being assigned. As long as it is not bound to a DNS service, forwarding is not done.
