Skip to content
Smarter by Design.Simpler for Business

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 ​

TR7 WEB-CLI · gtm forwarder-profile
admin@TR7LBWAF01> gtm forwarder-profile list # list them all
admin@TR7LBWAF01> gtm forwarder-profile show <id> # show one
admin@TR7LBWAF01> gtm forwarder-profile add name <name> addresses <addresses>
admin@TR7LBWAF01> gtm forwarder-profile update id <id> … # change
admin@TR7LBWAF01> gtm forwarder-profile delete <id> # delete
admin@TR7LBWAF01>  

Required Fields ​

OrderFieldStatusValue
1nameRequiredThe name of the profile
2addressesRequiredThe 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.

TR7 WEB-CLI · the single and multiple address writing
# a single address
admin@TR7LBWAF01> gtm forwarder-profile add name kurum-forwarder addresses 8.8.8.8
# two addresses: a single value, a space between them
admin@TR7LBWAF01> gtm forwarder-profile add name kurum-forwarder addresses "8.8.8.8 1.1.1.1"
admin@TR7LBWAF01>  

Every address has to conform to one of the following formats; a domain name is not accepted:

FormatExample
IPv48.8.8.8
IPv4 and port8.8.8.8:5353
IPv62001: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.

FieldValue
--domainBasedForwarding.0.domainThe domain name to which the rule will be applied; the subdomain names are covered as well
--domainBasedForwarding.0.addressesThe 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 ​

FieldWhat it doesWhat is written after it
--metaData.N.keyDetermines the key of the line that will be written directly into the resolver configurationThe key name; every pair with its own index
--metaData.N.valueDetermines the value of that keyThe value text

Assigning the Profile to the DNS Service ​

TR7 WEB-CLI · binding the profile to the service
admin@TR7LBWAF01> gtm forwarder-profile list # find the identifier of the profile
admin@TR7LBWAF01> gtm service update id <service> --forwarder <profile>
admin@TR7LBWAF01>  

Examples ​

TR7 WEB-CLI · A) A separate server for an in-house domain name
admin@TR7LBWAF01> gtm forwarder-profile add name kurum-forwarder addresses "8.8.8.8 1.1.1.1" \
--domainBasedForwarding.0.domain kurum.local --domainBasedForwarding.0.addresses 10.0.0.53
admin@TR7LBWAF01>  
TR7 WEB-CLI · B) An address with a port and a second rule
admin@TR7LBWAF01> gtm forwarder-profile update id <id> \
--addresses "8.8.8.8:5353 [2001:db8::1]:5353" \
--domainBasedForwarding.1.domain test.local --domainBasedForwarding.1.addresses 10.0.1.53
admin@TR7LBWAF01>  

Updating and Deleting ​

TR7 WEB-CLI · update and delete
admin@TR7LBWAF01> gtm forwarder-profile update id <id> --addresses 9.9.9.9
admin@TR7LBWAF01> gtm forwarder-profile update id <id> --domainBasedForwarding.delete # remove the rules
admin@TR7LBWAF01> gtm forwarder-profile delete <id>
admin@TR7LBWAF01>  

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.