Configuring DNS rules

DNS rules are configured at the network dns rules level using the UPL syntax. For more details on the command structure, see Configuring Rules Using UPL.

DNS rule parameters:

Parameter

Description

PASS

OK

Action to create a rule using UPL.

enabled

Enable/disable the rule:

  • enabled(yes) or enabled(true).

  • enabled(no) or enabled(false).

name

The name of the rule.

Example: name("DNS rule example").

desc

DNS proxy rule description.

Example: desc("DNS rule example set via CLI").

url.domain

List of domains to which you want to redirect. You can use an asterisk (*) to specify a domain template.

To specify a list of domains: url.domain = "*.example.com".

dns_server

List of DNS server IP addresses to which requests for the specified domains should be forwarded.

To specify a server: dns_server(1.2.3.4).

Example command to create a DNS rule using UPL:

Admin@nodename# create network dns rules 1 upl-rule OK \ ...url.domain = "*.example.com" \ ...dns_server(1.2.3.4) \ ...name("DNS rule example") \ ...desc("DNS rule example description over CLI") \ ...enabled(true) \ ... Admin@nodename# Admin@nodename# show network dns rules % ----------------- 1 ----------------- OK \ url.domain = "*.example.com" \ dns_server(1.2.3.4) \ desc("DNS rule example description over CLI") \ enabled(true) \ id("0f83e1bb-0aa5-4f42-8eeb-9c4ffa30c04a") \ name("DNS rule example")