summaryrefslogtreecommitdiff
path: root/interface-definitions/dns-dynamic.xml.in
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions/dns-dynamic.xml.in')
-rw-r--r--interface-definitions/dns-dynamic.xml.in318
1 files changed, 100 insertions, 218 deletions
diff --git a/interface-definitions/dns-dynamic.xml.in b/interface-definitions/dns-dynamic.xml.in
index e41ba7f60..a0720f3aa 100644
--- a/interface-definitions/dns-dynamic.xml.in
+++ b/interface-definitions/dns-dynamic.xml.in
@@ -4,284 +4,166 @@
<children>
<node name="dns">
<properties>
- <help>Domain Name System related services</help>
+ <help>Domain Name System (DNS) related services</help>
</properties>
<children>
- <node name="dynamic" owner="${vyos_conf_scripts_dir}/dynamic_dns.py">
+ <node name="dynamic" owner="${vyos_conf_scripts_dir}/dns_dynamic.py">
<properties>
<help>Dynamic DNS</help>
</properties>
<children>
- <tagNode name="interface">
+ <tagNode name="address">
<properties>
- <help>Interface to send DDNS updates for</help>
+ <help>Obtain IP address to send Dynamic DNS update for</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Use interface to obtain the IP address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>web</format>
+ <description>Use HTTP(S) web request to obtain the IP address</description>
+ </valueHelp>
<completionHelp>
- <script>${vyos_completion_dir}/list_interfaces.py</script>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ <list>web</list>
</completionHelp>
+ <constraint>
+ #include <include/constraint/interface-name.xml.i>
+ <regex>web</regex>
+ </constraint>
</properties>
<children>
- <tagNode name="rfc2136">
+ <node name="web-options">
<properties>
- <help>RFC2136 Update name</help>
+ <help>Options when using HTTP(S) web request to obtain the IP address</help>
</properties>
<children>
- <leafNode name="key">
+ #include <include/url.xml.i>
+ <leafNode name="skip">
<properties>
- <help>File containing the secret key shared with remote DNS server</help>
+ <help>Pattern to skip from the HTTP(S) respose</help>
<valueHelp>
- <format>filename</format>
- <description>File in /config/auth directory</description>
+ <format>txt</format>
+ <description>Pattern to skip from the HTTP(S) respose to extract the external IP address</description>
</valueHelp>
</properties>
</leafNode>
- <leafNode name="record">
- <properties>
- <help>Record to be updated</help>
- <multi/>
- </properties>
- </leafNode>
- <leafNode name="server">
- <properties>
- <help>Server to be updated</help>
- </properties>
- </leafNode>
- <leafNode name="ttl">
+ </children>
+ </node>
+ <tagNode name="rfc2136">
+ <properties>
+ <help>RFC2136 nsupdate configuration</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>RFC2136 nsupdate service name</description>
+ </valueHelp>
+ </properties>
+ <children>
+ #include <include/generic-description.xml.i>
+ #include <include/dns/dynamic-service-host-name-server.xml.i>
+ <leafNode name="key">
<properties>
- <help>Time To Live (default: 600)</help>
+ <help>File containing the TSIG secret key shared with remote DNS server</help>
<valueHelp>
- <format>u32:1-86400</format>
- <description>DNS forwarding cache size</description>
+ <format>filename</format>
+ <description>File in /config/auth directory</description>
</valueHelp>
<constraint>
- <validator name="numeric" argument="--range 1-86400"/>
+ <validator name="file-path" argument="--strict --parent-dir /config/auth"/>
</constraint>
</properties>
- <defaultValue>600</defaultValue>
</leafNode>
+ #include <include/dns/time-to-live.xml.i>
<leafNode name="zone">
<properties>
- <help>Zone to be updated</help>
+ <help>Forwarding zone to be updated</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>RFC2136 Zone to be updated</description>
+ </valueHelp>
+ <constraint>
+ <validator name="fqdn"/>
+ </constraint>
</properties>
</leafNode>
</children>
</tagNode>
<tagNode name="service">
<properties>
- <help>Service being used for Dynamic DNS</help>
- <completionHelp>
- <list>afraid changeip cloudflare dnspark dslreports dyndns easydns namecheap noip sitelutions zoneedit</list>
- </completionHelp>
+ <help>Dynamic DNS configuration</help>
<valueHelp>
<format>txt</format>
- <description>Dynanmic DNS service with a custom name</description>
- </valueHelp>
- <valueHelp>
- <format>afraid</format>
- <description>afraid.org Services</description>
- </valueHelp>
- <valueHelp>
- <format>changeip</format>
- <description>changeip.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>cloudflare</format>
- <description>cloudflare.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>dnspark</format>
- <description>dnspark.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>dslreports</format>
- <description>dslreports.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>dyndns</format>
- <description>dyndns.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>easydns</format>
- <description>easydns.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>namecheap</format>
- <description>namecheap.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>noip</format>
- <description>noip.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>sitelutions</format>
- <description>sitelutions.com Services</description>
- </valueHelp>
- <valueHelp>
- <format>zoneedit</format>
- <description>zoneedit.com Services</description>
+ <description>Dynamic DNS service name</description>
</valueHelp>
- <constraint>
- <regex>(custom|afraid|changeip|cloudflare|dnspark|dslreports|dyndns|easydns|namecheap|noip|sitelutions|zoneedit|\w+)</regex>
- </constraint>
- <constraintErrorMessage>You can use only predefined list of services or word characters (_, a-z, A-Z, 0-9) as service name</constraintErrorMessage>
</properties>
<children>
- <leafNode name="host-name">
- <properties>
- <help>Hostname registered with DDNS service</help>
- <multi/>
- </properties>
- </leafNode>
- <leafNode name="login">
+ #include <include/generic-description.xml.i>
+ #include <include/dns/dynamic-service-host-name-server.xml.i>
+ #include <include/generic-username.xml.i>
+ #include <include/generic-password.xml.i>
+ <leafNode name="protocol">
<properties>
- <help>Login for DDNS service</help>
+ <help>ddclient protocol used for Dynamic DNS service</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_ddclient_protocols.sh</script>
+ </completionHelp>
+ <constraint>
+ <validator name="ddclient-protocol"/>
+ </constraint>
</properties>
</leafNode>
- <leafNode name="password">
+ <leafNode name="zone">
<properties>
- <help>Password for DDNS service</help>
+ <help>DNS zone to update (not used by all protocols)</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Name of DNS zone</description>
+ </valueHelp>
</properties>
</leafNode>
- <leafNode name="protocol">
+ <leafNode name="ip-version">
<properties>
- <help>ddclient protocol used for DDNS service</help>
- <completionHelp>
- <list>changeip cloudflare dnsmadeeasy dnspark dondominio dslreports1 dtdns duckdns dyndns2 easydns freedns freemyip googledomains hammernode1 namecheap nfsn noip sitelutions woima yandex zoneedit1</list>
- </completionHelp>
- <valueHelp>
- <format>changeip</format>
- <description>ChangeIP protocol</description>
- </valueHelp>
- <valueHelp>
- <format>cloudflare</format>
- <description>Cloudflare protocol</description>
- </valueHelp>
- <valueHelp>
- <format>dnsmadeeasy</format>
- <description>DNS Made Easy protocol</description>
- </valueHelp>
- <valueHelp>
- <format>dnspark</format>
- <description>DNS Park protocol</description>
- </valueHelp>
- <valueHelp>
- <format>dondominio</format>
- <description>DonDominio protocol</description>
- </valueHelp>
- <valueHelp>
- <format>dslreports1</format>
- <description>DslReports protocol</description>
- </valueHelp>
- <valueHelp>
- <format>dtdns</format>
- <description>DtDNS protocol</description>
- </valueHelp>
- <valueHelp>
- <format>duckdns</format>
- <description>DuckDNS protocol</description>
- </valueHelp>
- <valueHelp>
- <format>dyndns2</format>
- <description>DynDNS protocol v2</description>
- </valueHelp>
- <valueHelp>
- <format>easydns</format>
- <description>easyDNS protocol</description>
- </valueHelp>
- <valueHelp>
- <format>freedns</format>
- <description>FreeDNS protocol</description>
- </valueHelp>
- <valueHelp>
- <format>freemyip</format>
- <description>freemyip protocol</description>
- </valueHelp>
- <valueHelp>
- <format>googledomains</format>
- <description>Google domains protocol</description>
- </valueHelp>
- <valueHelp>
- <format>hammernode1</format>
- <description>Hammernode protocol</description>
- </valueHelp>
- <valueHelp>
- <format>namecheap</format>
- <description>Namecheap protocol</description>
- </valueHelp>
- <valueHelp>
- <format>nfsn</format>
- <description>NearlyFreeSpeech DNS protocol</description>
- </valueHelp>
- <valueHelp>
- <format>noip</format>
- <description>No-IP protocol</description>
- </valueHelp>
- <valueHelp>
- <format>sitelutions</format>
- <description>Sitelutions protocol</description>
- </valueHelp>
+ <help>IP address version to use</help>
<valueHelp>
- <format>woima</format>
- <description>WOIMA protocol</description>
+ <format>_ipv4</format>
+ <description>Use only IPv4 address</description>
</valueHelp>
<valueHelp>
- <format>yandex</format>
- <description>Yandex.DNS protocol</description>
+ <format>_ipv6</format>
+ <description>Use only IPv6 address</description>
</valueHelp>
<valueHelp>
- <format>zoneedit1</format>
- <description>Zoneedit protocol</description>
+ <format>both</format>
+ <description>Use both IPv4 and IPv6 address</description>
</valueHelp>
+ <completionHelp>
+ <list>ipv4 ipv6 both</list>
+ </completionHelp>
<constraint>
- <regex>(changeip|cloudflare|dnsmadeeasy|dnspark|dondominio|dslreports1|dtdns|duckdns|dyndns2|easydns|freedns|freemyip|googledomains|hammernode1|namecheap|nfsn|noip|sitelutions|woima|yandex|zoneedit1)</regex>
+ <regex>(ipv[46]|both)</regex>
</constraint>
- <constraintErrorMessage>Please choose from the list of allowed protocols</constraintErrorMessage>
- </properties>
- </leafNode>
- <leafNode name="server">
- <properties>
- <help>Server to send DDNS update to</help>
- <valueHelp>
- <format>IPv4</format>
- <description>IP address of DDNS server</description>
- </valueHelp>
- <valueHelp>
- <format>FQDN</format>
- <description>Hostname of DDNS server</description>
- </valueHelp>
- </properties>
- </leafNode>
- <leafNode name="zone">
- <properties>
- <help>DNS zone to update (only available with CloudFlare)</help>
+ <constraintErrorMessage>IP Version must be literal 'ipv4', 'ipv6' or 'both'</constraintErrorMessage>
</properties>
+ <defaultValue>ipv4</defaultValue>
</leafNode>
</children>
</tagNode>
- <node name="use-web">
- <properties>
- <help>Web check used for obtaining the external IP address</help>
- </properties>
- <children>
- <leafNode name="skip">
- <properties>
- <help>Skip everything before this on the given URL</help>
- </properties>
- </leafNode>
- <leafNode name="url">
- <properties>
- <help>URL to obtain the current external IP address</help>
- </properties>
- </leafNode>
- </children>
- </node>
- <leafNode name="ipv6-enable">
- <properties>
- <help>Allow explicit IPv6 addresses for Dynamic DNS for this interface</help>
- <valueless/>
- </properties>
- </leafNode>
</children>
</tagNode>
+ <leafNode name="timeout">
+ <properties>
+ <help>Time in seconds to wait between DNS updates</help>
+ <valueHelp>
+ <format>u32:60-3600</format>
+ <description>Time in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 60-3600"/>
+ </constraint>
+ <constraintErrorMessage>Timeout must be between 60 and 3600 seconds</constraintErrorMessage>
+ </properties>
+ <defaultValue>300</defaultValue>
+ </leafNode>
</children>
</node>
</children>