summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/bcast-relay.xml16
-rw-r--r--interface-definitions/cron.xml3
-rw-r--r--interface-definitions/dns-forwarding.xml107
-rw-r--r--interface-definitions/ntp.xml76
-rw-r--r--interface-definitions/ssh.xml151
5 files changed, 348 insertions, 5 deletions
diff --git a/interface-definitions/bcast-relay.xml b/interface-definitions/bcast-relay.xml
index e4a009ed4..19f29e340 100644
--- a/interface-definitions/bcast-relay.xml
+++ b/interface-definitions/bcast-relay.xml
@@ -14,11 +14,13 @@
<properties>
<help>Unique ID for each UDP port to forward</help>
<valueHelp>
- <format>u32:1-99</format>
+ <format>1-99</format>
<description>Numerical ID #</description>
</valueHelp>
- <type>u32</type>
<priority>990</priority>
+ <constraint>
+ <validator name="numeric" argument="--range 1-99"/>
+ </constraint>
</properties>
<children>
<leafNode name="address">
@@ -28,7 +30,9 @@
<format>ipv4</format>
<description>Optional source address for forwarded packets</description>
</valueHelp>
- <type>ipv4</type>
+ <constraint>
+ <validator name="ipv4"/>
+ </constraint>
</properties>
</leafNode>
<leafNode name="description">
@@ -49,10 +53,12 @@
<properties>
<help>Destination or source port to listen and retransmit on [REQUIRED]</help>
<valueHelp>
- <format>u32:1-65535</format>
+ <format>1-65535</format>
<description>UDP port to listen on</description>
</valueHelp>
- <type>u32</type>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
</properties>
</leafNode>
</children>
diff --git a/interface-definitions/cron.xml b/interface-definitions/cron.xml
index a9e9b0401..65b95c5a4 100644
--- a/interface-definitions/cron.xml
+++ b/interface-definitions/cron.xml
@@ -44,6 +44,9 @@
<format>&lt;days&gt;d</format>
<description>Execution interval in days</description>
</valueHelp>
+ <constraint>
+ <regex>[1-9]([0-9]*)([mhd]{0,1})</regex>
+ </constraint>
</properties>
</leafNode>
<node name="executable">
diff --git a/interface-definitions/dns-forwarding.xml b/interface-definitions/dns-forwarding.xml
new file mode 100644
index 000000000..60b90c6a7
--- /dev/null
+++ b/interface-definitions/dns-forwarding.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0"?>
+
+<!-- DNS forwarder configuration -->
+
+<interfaceDefinition>
+ <node name="service">
+ <children>
+ <node name="dns">
+ <children>
+ <node name="forwarding" owner="${vyos_sbindir}/vyos-config-dns-forwarding.py">
+ <properties>
+ <help>DNS forwarding</help>
+ <priority>918</priority>
+ </properties>
+ <children>
+ <leafNode name="cache-size">
+ <properties>
+ <help>DNS forwarding cache size</help>
+ <valueHelp>
+ <format>0-10000</format>
+ <description>DNS forwarding cache size</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-10000"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="dhcp">
+ <properties>
+ <help>Use nameservers received from DHCP server for specified interface</help>
+ <completionHelp>
+ <script>${vyatta_sbindir}/vyatta-interfaces.pl --show all</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+ </leafNode>
+ <tagNode name="domain">
+ <properties>
+ <help>DNS domain to forward to a local server</help>
+ </properties>
+ <children>
+ <leafNode name="server">
+ <properties>
+ <help>Domain Name Server (DNS) to forward queries</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Domain Name Server (DNS) IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Domain Name Server (DNS) IPv6 address</description>
+ </valueHelp>
+ <multi/>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ <leafNode name="ignore-hosts-file">
+ <properties>
+ <help>Do not use local /etc/hosts file in name resolution</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="listen-on">
+ <properties>
+ <help>Interface to listen for DNS queries [REQUIRED]</help>
+ <completionHelp>
+ <script>${vyatta_sbindir}/vyatta-interfaces.pl --show all</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="name-server">
+ <properties>
+ <help>Domain Name Server (DNS)</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Domain Name Server (DNS) IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Domain Name Server (DNS) IPv6 address</description>
+ </valueHelp>
+ <multi/>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="system">
+ <properties>
+ <help>DNS forwarding to system nameservers</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/interface-definitions/ntp.xml b/interface-definitions/ntp.xml
new file mode 100644
index 000000000..e8cfc539c
--- /dev/null
+++ b/interface-definitions/ntp.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+
+<!-- NTP configuration -->
+
+<interfaceDefinition>
+ <node name="system">
+ <children>
+ <node name="ntp" owner="${vyos_sbindir}/vyos-config-ntp.py">
+ <properties>
+ <help>Network Time Protocol (NTP) configuration</help>
+ <priority>400</priority>
+ </properties>
+ <children>
+ <tagNode name="server">
+ <properties>
+ <help>Network Time Protocol (NTP) server</help>
+ </properties>
+ <children>
+ <leafNode name="dynamic">
+ <properties>
+ <help>Allow server to be configured even if not reachable</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="noselect">
+ <properties>
+ <help>Marks the server as unused</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="preempt">
+ <properties>
+ <help>Specifies the association as preemptable rather than the default persistent</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="prefer">
+ <properties>
+ <help>Marks the server as preferred</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ </children>
+ </tagNode>
+ <node name="allow-clients">
+ <properties>
+ <help>Network Time Protocol (NTP) server options</help>
+ <constraint>
+ <validator name="ip-prefix"/>
+ </constraint>
+ </properties>
+ <children>
+ <leafNode name="address">
+ <properties>
+ <help>IP address</help>
+ <valueHelp>
+ <format>ipv4net</format>
+ <description>IP address and prefix length</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6net</format>
+ <description>IPv6 address and prefix length</description>
+ </valueHelp>
+ <multi/>
+ <constraint>
+ <validator name="ip-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/interface-definitions/ssh.xml b/interface-definitions/ssh.xml
new file mode 100644
index 000000000..dfae1d8ed
--- /dev/null
+++ b/interface-definitions/ssh.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+
+<!--SSH configuration -->
+
+<interfaceDefinition>
+ <node name="service">
+ <children>
+ <node name="ssh" owner="${vyos_sbindir}/vyos-config-ssh.py">
+ <properties>
+ <help>Secure SHell (SSH) protocol</help>
+ <priority>500</priority>
+ </properties>
+ <children>
+ <node name="access-control">
+ <properties>
+ <help>SSH user/group access controls. Directives are processed in this: deny-users, allow-users, deny-groups and allow-groups</help>
+ </properties>
+ <children>
+ <node name="allow">
+ <children>
+ <leafNode name="group">
+ <properties>
+ <help>Login is allowed for users whose primary or supplementary group matches</help>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="user">
+ <properties>
+ <help>Login is allowed only for user names that match</help>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ <node name="deny">
+ <children>
+ <leafNode name="group">
+ <properties>
+ <help>Login is disallowed for users whose primary or supplementary group matches</help>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="user">
+ <properties>
+ <help>Login is disallowed for user names that match</help>
+ <multi/>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+ <leafNode name="ciphers">
+ <properties>
+ <help>Specifies allowed Ciphers</help>
+ <completionHelp>
+ <script>ssh -Q cipher | tr '\n' ' '</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="disable-host-validation">
+ <properties>
+ <help>Don't validate the remote host name with DNS</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="disable-password-authentication">
+ <properties>
+ <help>Don't allow unknown user to login with password</help>
+ <valueless/>
+ </properties>
+ </leafNode>
+ <leafNode name="key-exchange">
+ <properties>
+ <help>Specifies available KEX (Key Exchange) algorithms</help>
+ <completionHelp>
+ <script>ssh -Q kex | tr '\n' ' '</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="listen-address">
+ <properties>
+ <help>Local addresses SSH service should listen on</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IP address to listen for incoming connections</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>IPv6 address to listen for incoming connections</description>
+ </valueHelp>
+ <multi/>
+ <constraint>
+ <validator name="ipv4-address"/>
+ <validator name="ipv6-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="loglevel">
+ <properties>
+ <help>Log level</help>
+ <valueHelp>
+ <format>QUIET</format>
+ <description>stay silent</description>
+ </valueHelp>
+ <valueHelp>
+ <format>FATAL</format>
+ <description>log fatals only</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ERROR</format>
+ <description>log errors and fatals only</description>
+ </valueHelp>
+ <valueHelp>
+ <format>INFO</format>
+ <description>default log level</description>
+ </valueHelp>
+ <valueHelp>
+ <format>VERBOSE</format>
+ <description>enable logging of failed login attempts</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="mac">
+ <properties>
+ <help>Specifies available MAC (message authentication code) algorithms</help>
+ <completionHelp>
+ <script>ssh -Q mac | tr '\n' ' '</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+ </leafNode>
+ <leafNode name="port">
+ <properties>
+ <help>Port for SSH service</help>
+ <valueHelp>
+ <format>1-65535</format>
+ <description>Numeric IP port</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-65535"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
+</interfaceDefinition>