diff options
Diffstat (limited to 'interface-definitions')
36 files changed, 1934 insertions, 711 deletions
| diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index d36b34941..6d2eb18d0 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -3,7 +3,7 @@    <node name="container" owner="${vyos_conf_scripts_dir}/container.py">      <properties>        <help>Container applications</help> -      <priority>1280</priority> +      <priority>450</priority>      </properties>      <children>        <tagNode name="name"> diff --git a/interface-definitions/dhcp-server.xml.in b/interface-definitions/dhcp-server.xml.in index 1830cc1ad..583de7ba9 100644 --- a/interface-definitions/dhcp-server.xml.in +++ b/interface-definitions/dhcp-server.xml.in @@ -129,7 +129,7 @@                      <properties>                        <help>Bootstrap file name</help>                        <constraint> -                        <regex>[-_a-zA-Z0-9./]+</regex> +                        <regex>[[:ascii:]]{1,253}</regex>                        </constraint>                      </properties>                    </leafNode> diff --git a/interface-definitions/dns-dynamic.xml.in b/interface-definitions/dns-dynamic.xml.in index c7b45b8f7..a0720f3aa 100644 --- a/interface-definitions/dns-dynamic.xml.in +++ b/interface-definitions/dns-dynamic.xml.in @@ -150,6 +150,20 @@                    </tagNode>                  </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> diff --git a/interface-definitions/firewall.xml.in b/interface-definitions/firewall.xml.in index 1cdc7b819..127f4b7e7 100644 --- a/interface-definitions/firewall.xml.in +++ b/interface-definitions/firewall.xml.in @@ -6,66 +6,7 @@        <help>Firewall</help>      </properties>      <children> -      <leafNode name="all-ping"> -        <properties> -          <help>Policy for handling of all IPv4 ICMP echo requests</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable processing of all IPv4 ICMP echo requests</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable processing of all IPv4 ICMP echo requests</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>enable</defaultValue> -      </leafNode> -      <leafNode name="broadcast-ping"> -        <properties> -          <help>Policy for handling broadcast IPv4 ICMP echo and timestamp requests</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable processing of broadcast IPv4 ICMP echo/timestamp requests</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable processing of broadcast IPv4 ICMP echo/timestamp requests</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <leafNode name="config-trap"> -        <properties> -          <help>SNMP trap generation on firewall configuration changes</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable sending SNMP trap on firewall configuration change</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable sending SNMP trap on firewall configuration change</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> +      #include <include/firewall/global-options.xml.i>        <node name="group">          <properties>            <help>Firewall group</help> @@ -343,645 +284,28 @@            </tagNode>          </children>        </node> -      <tagNode name="interface"> +      <node name="ipv4">          <properties> -          <help>Interface name to apply firewall configuration</help> -          <completionHelp> -            <script>${vyos_completion_dir}/list_interfaces</script> -          </completionHelp> -          <constraint> -            #include <include/constraint/interface-name-with-wildcard.xml.i> -          </constraint> +          <help>IPv4 firewall</help>          </properties>          <children> -          <node name="in"> -            <properties> -              <help>Forwarded packets on inbound interface</help> -            </properties> -            <children> -              #include <include/firewall/name.xml.i> -            </children> -          </node> -          <node name="out"> -            <properties> -              <help>Forwarded packets on outbound interface</help> -            </properties> -            <children> -              #include <include/firewall/name.xml.i> -            </children> -          </node> -          <node name="local"> -            <properties> -              <help>Packets destined for this router</help> -            </properties> -            <children> -              #include <include/firewall/name.xml.i> -            </children> -          </node> -        </children> -      </tagNode> -      <leafNode name="ip-src-route"> -        <properties> -          <help>Policy for handling IPv4 packets with source route option</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable processing of IPv4 packets with source route option</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable processing of IPv4 packets with source route option</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <tagNode name="ipv6-name"> -        <properties> -          <help>IPv6 firewall rule-set name</help> -          <constraint> -            <regex>[a-zA-Z0-9][\w\-\.]*</regex> -          </constraint> -        </properties> -        <children> -          #include <include/firewall/default-action.xml.i> -          #include <include/firewall/enable-default-log.xml.i> -          #include <include/generic-description.xml.i> -          <leafNode name="default-jump-target"> -            <properties> -              <help>Set jump target. Action jump must be defined in default-action to use this setting</help> -              <completionHelp> -                <path>firewall ipv6-name</path> -              </completionHelp> -            </properties> -          </leafNode> -          <tagNode name="rule"> -            <properties> -              <help>Firewall rule number (IPv6)</help> -              <valueHelp> -                <format>u32:1-999999</format> -                <description>Number for this Firewall rule</description> -              </valueHelp> -              <constraint> -                <validator name="numeric" argument="--range 1-999999"/> -              </constraint> -              <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> -            </properties> -            <children> -              #include <include/firewall/action.xml.i> -              #include <include/generic-description.xml.i> -              <node name="destination"> -                <properties> -                  <help>Destination parameters</help> -                </properties> -                <children> -                  #include <include/firewall/address-ipv6.xml.i> -                  #include <include/firewall/fqdn.xml.i> -                  #include <include/firewall/geoip.xml.i> -                  #include <include/firewall/source-destination-group-ipv6.xml.i> -                  #include <include/firewall/port.xml.i> -                  #include <include/firewall/address-mask-ipv6.xml.i> -                </children> -              </node> -              <node name="source"> -                <properties> -                  <help>Source parameters</help> -                </properties> -                <children> -                  #include <include/firewall/address-ipv6.xml.i> -                  #include <include/firewall/fqdn.xml.i> -                  #include <include/firewall/geoip.xml.i> -                  #include <include/firewall/source-destination-group-ipv6.xml.i> -                  #include <include/firewall/port.xml.i> -                  #include <include/firewall/address-mask-ipv6.xml.i> -                </children> -              </node> -              #include <include/firewall/common-rule.xml.i> -              #include <include/firewall/dscp.xml.i> -              #include <include/firewall/packet-options.xml.i> -              #include <include/firewall/hop-limit.xml.i> -              #include <include/firewall/connection-mark.xml.i> -              <node name="icmpv6"> -                <properties> -                  <help>ICMPv6 type and code information</help> -                </properties> -                <children> -                  <leafNode name="code"> -                    <properties> -                      <help>ICMPv6 code</help> -                      <valueHelp> -                        <format>u32:0-255</format> -                        <description>ICMPv6 code (0-255)</description> -                      </valueHelp> -                      <constraint> -                        <validator name="numeric" argument="--range 0-255"/> -                      </constraint> -                    </properties> -                  </leafNode> -                  <leafNode name="type"> -                    <properties> -                      <help>ICMPv6 type</help> -                      <valueHelp> -                        <format>u32:0-255</format> -                        <description>ICMPv6 type (0-255)</description> -                      </valueHelp> -                      <constraint> -                        <validator name="numeric" argument="--range 0-255"/> -                      </constraint> -                    </properties> -                  </leafNode> -                  #include <include/firewall/icmpv6-type-name.xml.i> -                </children> -              </node> -              <leafNode name="jump-target"> -                <properties> -                  <help>Set jump target. Action jump must be defined to use this setting</help> -                  <completionHelp> -                    <path>firewall ipv6-name</path> -                  </completionHelp> -                </properties> -              </leafNode> -              #include <include/firewall/nft-queue.xml.i> -            </children> -          </tagNode> -        </children> -      </tagNode> -      <leafNode name="ipv6-receive-redirects"> -        <properties> -          <help>Policy for handling received ICMPv6 redirect messages</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable processing of received ICMPv6 redirect messages</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable processing of received ICMPv6 redirect messages</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <leafNode name="ipv6-src-route"> -        <properties> -          <help>Policy for handling IPv6 packets with routing extension header</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable processing of IPv6 packets with routing header type 2</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable processing of IPv6 packets with routing header</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <leafNode name="log-martians"> -        <properties> -          <help>Policy for logging IPv4 packets with invalid addresses</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable logging of IPv4 packets with invalid addresses</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable logging of Ipv4 packets with invalid addresses</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>enable</defaultValue> -      </leafNode> -      <tagNode name="name"> -        <properties> -          <help>IPv4 firewall rule-set name</help> -          <constraint> -            <regex>[a-zA-Z0-9][\w\-\.]*</regex> -          </constraint> -        </properties> -        <children> -          #include <include/firewall/default-action.xml.i> -          #include <include/firewall/enable-default-log.xml.i> -          #include <include/generic-description.xml.i> -          <leafNode name="default-jump-target"> -            <properties> -              <help>Set jump target. Action jump must be defined in default-action to use this setting</help> -              <completionHelp> -                <path>firewall name</path> -              </completionHelp> -            </properties> -          </leafNode> -          <tagNode name="rule"> -            <properties> -              <help>Firewall rule number (IPv4)</help> -              <valueHelp> -                <format>u32:1-999999</format> -                <description>Number for this Firewall rule</description> -              </valueHelp> -              <constraint> -                <validator name="numeric" argument="--range 1-999999"/> -              </constraint> -              <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> -            </properties> -            <children> -              #include <include/firewall/action.xml.i> -              #include <include/generic-description.xml.i> -              <node name="destination"> -                <properties> -                  <help>Destination parameters</help> -                </properties> -                <children> -                  #include <include/firewall/address.xml.i> -                  #include <include/firewall/fqdn.xml.i> -                  #include <include/firewall/geoip.xml.i> -                  #include <include/firewall/source-destination-group.xml.i> -                  #include <include/firewall/port.xml.i> -                  #include <include/firewall/address-mask.xml.i> -                </children> -              </node> -              <node name="source"> -                <properties> -                  <help>Source parameters</help> -                </properties> -                <children> -                  #include <include/firewall/address.xml.i> -                  #include <include/firewall/fqdn.xml.i> -                  #include <include/firewall/geoip.xml.i> -                  #include <include/firewall/source-destination-group.xml.i> -                  #include <include/firewall/port.xml.i> -                  #include <include/firewall/address-mask.xml.i> -                </children> -              </node> -              #include <include/firewall/common-rule.xml.i> -              #include <include/firewall/dscp.xml.i> -              #include <include/firewall/packet-options.xml.i> -              #include <include/firewall/connection-mark.xml.i> -              <node name="icmp"> -                <properties> -                  <help>ICMP type and code information</help> -                </properties> -                <children> -                  <leafNode name="code"> -                    <properties> -                      <help>ICMP code</help> -                      <valueHelp> -                        <format>u32:0-255</format> -                        <description>ICMP code (0-255)</description> -                      </valueHelp> -                      <constraint> -                        <validator name="numeric" argument="--range 0-255"/> -                      </constraint> -                    </properties> -                  </leafNode> -                  <leafNode name="type"> -                    <properties> -                      <help>ICMP type</help> -                      <valueHelp> -                        <format>u32:0-255</format> -                        <description>ICMP type (0-255)</description> -                      </valueHelp> -                      <constraint> -                        <validator name="numeric" argument="--range 0-255"/> -                      </constraint> -                    </properties> -                  </leafNode> -                  #include <include/firewall/icmp-type-name.xml.i> -                </children> -              </node> -              <leafNode name="jump-target"> -                <properties> -                  <help>Set jump target. Action jump must be defined to use this setting</help> -                  <completionHelp> -                    <path>firewall name</path> -                  </completionHelp> -                </properties> -              </leafNode> -              #include <include/firewall/ttl.xml.i> -              #include <include/firewall/nft-queue.xml.i> -            </children> -          </tagNode> -        </children> -      </tagNode> -      <leafNode name="receive-redirects"> -        <properties> -          <help>Policy for handling received IPv4 ICMP redirect messages</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable processing of received IPv4 ICMP redirect messages</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable processing of received IPv4 ICMP redirect messages</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <leafNode name="resolver-cache"> -        <properties> -          <help>Retains last successful value if domain resolution fails</help> -          <valueless/> -        </properties> -      </leafNode> -      <leafNode name="resolver-interval"> -        <properties> -          <help>Domain resolver update interval</help> -          <valueHelp> -            <format>u32:10-3600</format> -            <description>Interval (seconds)</description> -          </valueHelp> -          <constraint> -            <validator name="numeric" argument="--range 10-3600"/> -          </constraint> -        </properties> -        <defaultValue>300</defaultValue> -      </leafNode> -      <leafNode name="send-redirects"> -        <properties> -          <help>Policy for sending IPv4 ICMP redirect messages</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable sending IPv4 ICMP redirect messages</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable sending IPv4 ICMP redirect messages</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>enable</defaultValue> -      </leafNode> -      <leafNode name="source-validation"> -        <properties> -          <help>Policy for source validation by reversed path, as specified in RFC3704</help> -          <completionHelp> -            <list>strict loose disable</list> -          </completionHelp> -          <valueHelp> -            <format>strict</format> -            <description>Enable Strict Reverse Path Forwarding as defined in RFC3704</description> -          </valueHelp> -          <valueHelp> -            <format>loose</format> -            <description>Enable Loose Reverse Path Forwarding as defined in RFC3704</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>No source validation</description> -          </valueHelp> -          <constraint> -            <regex>(strict|loose|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <node name="state-policy"> -        <properties> -          <help>Global firewall state-policy</help> -        </properties> -        <children> -          <node name="established"> -            <properties> -              <help>Global firewall policy for packets part of an established connection</help> -            </properties> -            <children> -              #include <include/firewall/action-accept-drop-reject.xml.i> -              #include <include/firewall/log.xml.i> -              #include <include/firewall/rule-log-level.xml.i> -            </children> -          </node> -          <node name="invalid"> -            <properties> -              <help>Global firewall policy for packets part of an invalid connection</help> -            </properties> -            <children> -              #include <include/firewall/action-accept-drop-reject.xml.i> -              #include <include/firewall/log.xml.i> -              #include <include/firewall/rule-log-level.xml.i> -            </children> -          </node> -          <node name="related"> -            <properties> -              <help>Global firewall policy for packets part of a related connection</help> -            </properties> -            <children> -              #include <include/firewall/action-accept-drop-reject.xml.i> -              #include <include/firewall/log.xml.i> -              #include <include/firewall/rule-log-level.xml.i> -            </children> -          </node> +          #include <include/firewall/ipv4-hook-forward.xml.i> +          #include <include/firewall/ipv4-hook-input.xml.i> +          #include <include/firewall/ipv4-hook-output.xml.i> +          #include <include/firewall/ipv4-custom-name.xml.i>          </children>        </node> -      <leafNode name="syn-cookies"> -        <properties> -          <help>Policy for using TCP SYN cookies with IPv4</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable use of TCP SYN cookies with IPv4</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable use of TCP SYN cookies with IPv4</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>enable</defaultValue> -      </leafNode> -      <leafNode name="twa-hazards-protection"> +      <node name="ipv6">          <properties> -          <help>RFC1337 TCP TIME-WAIT assasination hazards protection</help> -          <completionHelp> -            <list>enable disable</list> -          </completionHelp> -          <valueHelp> -            <format>enable</format> -            <description>Enable RFC1337 TIME-WAIT hazards protection</description> -          </valueHelp> -          <valueHelp> -            <format>disable</format> -            <description>Disable RFC1337 TIME-WAIT hazards protection</description> -          </valueHelp> -          <constraint> -            <regex>(enable|disable)</regex> -          </constraint> -        </properties> -        <defaultValue>disable</defaultValue> -      </leafNode> -      <tagNode name="zone"> -        <properties> -          <help>Zone-policy</help> -          <valueHelp> -            <format>txt</format> -            <description>Zone name</description> -          </valueHelp> -          <constraint> -            <regex>[a-zA-Z0-9][\w\-\.]*</regex> -          </constraint> +          <help>IPv6 firewall</help>          </properties>          <children> -          #include <include/generic-description.xml.i> -          #include <include/firewall/enable-default-log.xml.i> -          <leafNode name="default-action"> -            <properties> -              <help>Default-action for traffic coming into this zone</help> -              <completionHelp> -                <list>drop reject</list> -              </completionHelp> -              <valueHelp> -                <format>drop</format> -                <description>Drop silently</description> -              </valueHelp> -              <valueHelp> -                <format>reject</format> -                <description>Drop and notify source</description> -              </valueHelp> -              <constraint> -                <regex>(drop|reject)</regex> -              </constraint> -            </properties> -            <defaultValue>drop</defaultValue> -          </leafNode> -          <tagNode name="from"> -            <properties> -              <help>Zone from which to filter traffic</help> -              <completionHelp> -                <path>zone-policy zone</path> -              </completionHelp> -            </properties> -            <children> -              <node name="firewall"> -                <properties> -                  <help>Firewall options</help> -                </properties> -                <children> -                  <leafNode name="ipv6-name"> -                    <properties> -                      <help>IPv6 firewall ruleset</help> -                      <completionHelp> -                        <path>firewall ipv6-name</path> -                      </completionHelp> -                    </properties> -                  </leafNode> -                  <leafNode name="name"> -                    <properties> -                      <help>IPv4 firewall ruleset</help> -                      <completionHelp> -                        <path>firewall name</path> -                      </completionHelp> -                    </properties> -                  </leafNode> -                </children> -              </node> -            </children> -          </tagNode> -          <leafNode name="interface"> -            <properties> -              <help>Interface associated with zone</help> -              <valueHelp> -                <format>txt</format> -                <description>Interface associated with zone</description> -              </valueHelp> -              <valueHelp> -                <format>vrf</format> -                <description>VRF associated with zone</description> -              </valueHelp> -              <completionHelp> -                <script>${vyos_completion_dir}/list_interfaces</script> -                <path>vrf name</path> -              </completionHelp> -              <multi/> -            </properties> -          </leafNode> -          <node name="intra-zone-filtering"> -            <properties> -              <help>Intra-zone filtering</help> -            </properties> -            <children> -              <leafNode name="action"> -                <properties> -                  <help>Action for intra-zone traffic</help> -                  <completionHelp> -                    <list>accept drop</list> -                  </completionHelp> -                  <valueHelp> -                    <format>accept</format> -                    <description>Accept traffic</description> -                  </valueHelp> -                  <valueHelp> -                    <format>drop</format> -                    <description>Drop silently</description> -                  </valueHelp> -                  <constraint> -                    <regex>(accept|drop)</regex> -                  </constraint> -                </properties> -              </leafNode> -              <node name="firewall"> -                <properties> -                  <help>Use the specified firewall chain</help> -                </properties> -                <children> -                  <leafNode name="ipv6-name"> -                    <properties> -                      <help>IPv6 firewall ruleset</help> -                      <completionHelp> -                        <path>firewall ipv6-name</path> -                      </completionHelp> -                    </properties> -                  </leafNode> -                  <leafNode name="name"> -                    <properties> -                      <help>IPv4 firewall ruleset</help> -                      <completionHelp> -                        <path>firewall name</path> -                      </completionHelp> -                    </properties> -                  </leafNode> -                </children> -              </node> -            </children> -          </node> -          <leafNode name="local-zone"> -            <properties> -              <help>Zone to be local-zone</help> -              <valueless/> -            </properties> -          </leafNode> +          #include <include/firewall/ipv6-hook-forward.xml.i> +          #include <include/firewall/ipv6-hook-input.xml.i> +          #include <include/firewall/ipv6-hook-output.xml.i> +          #include <include/firewall/ipv6-custom-name.xml.i>          </children> -      </tagNode> +      </node>      </children>    </node>  </interfaceDefinition> diff --git a/interface-definitions/include/bgp/protocol-common-config.xml.i b/interface-definitions/include/bgp/protocol-common-config.xml.i index 12024ed8b..504385b53 100644 --- a/interface-definitions/include/bgp/protocol-common-config.xml.i +++ b/interface-definitions/include/bgp/protocol-common-config.xml.i @@ -1123,25 +1123,26 @@              <valueless/>            </properties>          </leafNode> -        <node name="med"> +        <leafNode name="med">            <properties>              <help>MED attribute comparison parameters</help> +            <completionHelp> +              <list>confed missing-as-worst</list> +            </completionHelp> +            <valueHelp> +              <format>confed</format> +              <description>Compare MEDs among confederation paths</description> +            </valueHelp> +            <valueHelp> +              <format>missing-as-worst</format> +              <description>Treat missing route as a MED as the least preferred one</description> +            </valueHelp> +            <constraint> +              <regex>(confed|missing-as-worst)</regex> +            </constraint> +            <multi/>            </properties> -          <children> -            <leafNode name="confed"> -              <properties> -                <help>Compare MEDs among confederation paths</help> -                <valueless/> -              </properties> -            </leafNode> -            <leafNode name="missing-as-worst"> -              <properties> -                <help>Treat missing route as a MED as the least preferred one</help> -                <valueless/> -              </properties> -            </leafNode> -          </children> -        </node> +        </leafNode>          <node name="peer-type">            <properties>              <help>Peer type</help> diff --git a/interface-definitions/include/firewall/action-and-notrack.xml.i b/interface-definitions/include/firewall/action-and-notrack.xml.i new file mode 100644 index 000000000..5f81a1451 --- /dev/null +++ b/interface-definitions/include/firewall/action-and-notrack.xml.i @@ -0,0 +1,41 @@ +<!-- include start from firewall/action-and-notrack.xml.i --> +<leafNode name="action"> +  <properties> +    <help>Rule action</help> +    <completionHelp> +      <list>accept jump notrack reject return drop queue</list> +    </completionHelp> +    <valueHelp> +      <format>accept</format> +      <description>Accept matching entries</description> +    </valueHelp> +    <valueHelp> +      <format>jump</format> +      <description>Jump to another chain</description> +    </valueHelp> +    <valueHelp> +      <format>reject</format> +      <description>Reject matching entries</description> +    </valueHelp> +    <valueHelp> +      <format>return</format> +      <description>Return from the current chain and continue at the next rule of the last chain</description> +    </valueHelp> +    <valueHelp> +      <format>drop</format> +      <description>Drop matching entries</description> +    </valueHelp> +    <valueHelp> +      <format>queue</format> +      <description>Enqueue packet to userspace</description> +    </valueHelp> +    <valueHelp> +      <format>notrack</format> +      <description>Igone connection tracking</description> +    </valueHelp> +    <constraint> +      <regex>(accept|jump|notrack|reject|return|drop|queue)</regex> +    </constraint> +  </properties> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/include/firewall/common-rule-inet.xml.i b/interface-definitions/include/firewall/common-rule-inet.xml.i new file mode 100644 index 000000000..7a2eb86d4 --- /dev/null +++ b/interface-definitions/include/firewall/common-rule-inet.xml.i @@ -0,0 +1,374 @@ +<!-- include start from firewall/common-rule-inet.xml.i --> +#include <include/firewall/action.xml.i> +#include <include/generic-description.xml.i> +#include <include/firewall/dscp.xml.i> +#include <include/firewall/packet-options.xml.i> +#include <include/firewall/connection-mark.xml.i> +#include <include/firewall/nft-queue.xml.i> +<leafNode name="disable"> +  <properties> +    <help>Option to disable firewall rule</help> +    <valueless/> +  </properties> +</leafNode> +<node name="fragment"> +  <properties> +    <help>IP fragment match</help> +  </properties> +  <children> +    <leafNode name="match-frag"> +      <properties> +        <help>Second and further fragments of fragmented packets</help> +        <valueless/> +      </properties> +    </leafNode> +    <leafNode name="match-non-frag"> +      <properties> +        <help>Head fragments or unfragmented packets</help> +        <valueless/> +      </properties> +    </leafNode> +  </children> +</node> +<node name="ipsec"> +  <properties> +    <help>Inbound IPsec packets</help> +  </properties> +  <children> +    <leafNode name="match-ipsec"> +      <properties> +        <help>Inbound IPsec packets</help> +        <valueless/> +      </properties> +    </leafNode> +    <leafNode name="match-none"> +      <properties> +        <help>Inbound non-IPsec packets</help> +        <valueless/> +      </properties> +    </leafNode> +  </children> +</node> +<node name="limit"> +  <properties> +    <help>Rate limit using a token bucket filter</help> +  </properties> +  <children> +    <leafNode name="burst"> +      <properties> +        <help>Maximum number of packets to allow in excess of rate</help> +        <valueHelp> +          <format>u32:0-4294967295</format> +          <description>Maximum number of packets to allow in excess of rate</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-4294967295"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="rate"> +      <properties> +        <help>Maximum average matching rate</help> +        <valueHelp> +          <format>txt</format> +          <description>integer/unit (Example: 5/minute)</description> +        </valueHelp> +        <constraint> +          <regex>\d+/(second|minute|hour|day)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +<leafNode name="log"> +  <properties> +    <help>Option to log packets matching rule</help> +    <completionHelp> +      <list>enable disable</list> +    </completionHelp> +    <valueHelp> +      <format>enable</format> +      <description>Enable log</description> +    </valueHelp> +    <valueHelp> +      <format>disable</format> +      <description>Disable log</description> +    </valueHelp> +    <constraint> +      <regex>(enable|disable)</regex> +    </constraint> +  </properties> +</leafNode> +<leafNode name="log"> +  <properties> +    <help>Option to log packets matching rule</help> +    <completionHelp> +      <list>enable disable</list> +    </completionHelp> +    <valueHelp> +      <format>enable</format> +      <description>Enable log</description> +    </valueHelp> +    <valueHelp> +      <format>disable</format> +      <description>Disable log</description> +    </valueHelp> +    <constraint> +      <regex>(enable|disable)</regex> +    </constraint> +  </properties> +</leafNode> +#include <include/firewall/rule-log-options.xml.i> +<node name="connection-status"> +  <properties> +    <help>Connection status</help> +  </properties> +  <children> +    <leafNode name="nat"> +      <properties> +        <help>NAT connection status</help> +        <completionHelp> +          <list>destination source</list> +        </completionHelp> +        <valueHelp> +          <format>destination</format> +          <description>Match connections that are subject to destination NAT</description> +        </valueHelp> +        <valueHelp> +          <format>source</format> +          <description>Match connections that are subject to source NAT</description> +        </valueHelp> +        <constraint> +          <regex>(destination|source)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +<leafNode name="protocol"> +  <properties> +    <help>Protocol to match (protocol name, number, or "all")</help> +    <completionHelp> +      <script>${vyos_completion_dir}/list_protocols.sh</script> +      <list>all tcp_udp</list> +    </completionHelp> +    <valueHelp> +      <format>all</format> +      <description>All IP protocols</description> +    </valueHelp> +    <valueHelp> +      <format>tcp_udp</format> +      <description>Both TCP and UDP</description> +    </valueHelp> +    <valueHelp> +      <format>u32:0-255</format> +      <description>IP protocol number</description> +    </valueHelp> +    <valueHelp> +      <format><protocol></format> +      <description>IP protocol name</description> +    </valueHelp> +    <valueHelp> +      <format>!<protocol></format> +      <description>IP protocol name</description> +    </valueHelp> +    <constraint> +      <validator name="ip-protocol"/> +    </constraint> +  </properties> +</leafNode> +<node name="recent"> +  <properties> +    <help>Parameters for matching recently seen sources</help> +  </properties> +  <children> +    <leafNode name="count"> +      <properties> +        <help>Source addresses seen more than N times</help> +        <valueHelp> +          <format>u32:1-255</format> +          <description>Source addresses seen more than N times</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 1-255"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="time"> +      <properties> +        <help>Source addresses seen in the last second/minute/hour</help> +        <completionHelp> +          <list>second minute hour</list> +        </completionHelp> +        <valueHelp> +          <format>second</format> +          <description>Source addresses seen COUNT times in the last second</description> +        </valueHelp> +        <valueHelp> +          <format>minute</format> +          <description>Source addresses seen COUNT times in the last minute</description> +        </valueHelp> +        <valueHelp> +          <format>hour</format> +          <description>Source addresses seen COUNT times in the last hour</description> +        </valueHelp> +        <constraint> +          <regex>(second|minute|hour)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +<node name="state"> +  <properties> +    <help>Session state</help> +  </properties> +  <children> +    <leafNode name="established"> +      <properties> +        <help>Established state</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="invalid"> +      <properties> +        <help>Invalid state</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="new"> +      <properties> +        <help>New state</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="related"> +      <properties> +        <help>Related state</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +#include <include/firewall/tcp-flags.xml.i> +<node name="time"> +  <properties> +    <help>Time to match rule</help> +  </properties> +  <children> +    <leafNode name="startdate"> +      <properties> +        <help>Date to start matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter date using following notation - YYYY-MM-DD</description> +        </valueHelp> +        <constraint> +          <regex>(\d{4}\-\d{2}\-\d{2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="starttime"> +      <properties> +        <help>Time of day to start matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter time using using 24 hour notation - hh:mm:ss</description> +        </valueHelp> +        <constraint> +          <regex>([0-2][0-9](\:[0-5][0-9]){1,2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="stopdate"> +      <properties> +        <help>Date to stop matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter date using following notation - YYYY-MM-DD</description> +        </valueHelp> +        <constraint> +          <regex>(\d{4}\-\d{2}\-\d{2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="stoptime"> +      <properties> +        <help>Time of day to stop matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter time using using 24 hour notation - hh:mm:ss</description> +        </valueHelp> +        <constraint> +          <regex>([0-2][0-9](\:[0-5][0-9]){1,2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="weekdays"> +      <properties> +        <help>Comma separated weekdays to match rule on</help> +        <valueHelp> +          <format>txt</format> +          <description>Name of day (Monday, Tuesday, Wednesday, Thursdays, Friday, Saturday, Sunday)</description> +        </valueHelp> +        <valueHelp> +          <format>u32:0-6</format> +          <description>Day number (0 = Sunday ... 6 = Saturday)</description> +        </valueHelp> +      </properties> +    </leafNode> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/common-rule-ipv4-raw.xml.i b/interface-definitions/include/firewall/common-rule-ipv4-raw.xml.i new file mode 100644 index 000000000..a1071a09a --- /dev/null +++ b/interface-definitions/include/firewall/common-rule-ipv4-raw.xml.i @@ -0,0 +1,331 @@ +<!-- include start from firewall/common-rule-ipv4-raw.xml.i --> +#include <include/firewall/action-and-notrack.xml.i> +#include <include/generic-description.xml.i> +#include <include/firewall/dscp.xml.i> +#include <include/firewall/ttl.xml.i> +#include <include/firewall/nft-queue.xml.i> +<node name="destination"> +  <properties> +    <help>Destination parameters</help> +  </properties> +  <children> +    #include <include/firewall/address.xml.i> +    #include <include/firewall/address-mask.xml.i> +    #include <include/firewall/fqdn.xml.i> +    #include <include/firewall/geoip.xml.i> +    #include <include/firewall/mac-address.xml.i> +    #include <include/firewall/port.xml.i> +    #include <include/firewall/source-destination-group.xml.i> +  </children> +</node> +<leafNode name="disable"> +  <properties> +    <help>Option to disable firewall rule</help> +    <valueless/> +  </properties> +</leafNode> +<node name="fragment"> +  <properties> +    <help>IP fragment match</help> +  </properties> +  <children> +    <leafNode name="match-frag"> +      <properties> +        <help>Second and further fragments of fragmented packets</help> +        <valueless/> +      </properties> +    </leafNode> +    <leafNode name="match-non-frag"> +      <properties> +        <help>Head fragments or unfragmented packets</help> +        <valueless/> +      </properties> +    </leafNode> +  </children> +</node> +<node name="icmp"> +  <properties> +    <help>ICMP type and code information</help> +  </properties> +  <children> +    <leafNode name="code"> +      <properties> +        <help>ICMP code</help> +        <valueHelp> +          <format>u32:0-255</format> +          <description>ICMP code (0-255)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-255"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="type"> +      <properties> +        <help>ICMP type</help> +        <valueHelp> +          <format>u32:0-255</format> +          <description>ICMP type (0-255)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-255"/> +        </constraint> +      </properties> +    </leafNode> +    #include <include/firewall/icmp-type-name.xml.i> +  </children> +</node> +<node name="ipsec"> +  <properties> +    <help>Inbound IPsec packets</help> +  </properties> +  <children> +    <leafNode name="match-ipsec"> +      <properties> +        <help>Inbound IPsec packets</help> +        <valueless/> +      </properties> +    </leafNode> +    <leafNode name="match-none"> +      <properties> +        <help>Inbound non-IPsec packets</help> +        <valueless/> +      </properties> +    </leafNode> +  </children> +</node> +<node name="limit"> +  <properties> +    <help>Rate limit using a token bucket filter</help> +  </properties> +  <children> +    <leafNode name="burst"> +      <properties> +        <help>Maximum number of packets to allow in excess of rate</help> +        <valueHelp> +          <format>u32:0-4294967295</format> +          <description>Maximum number of packets to allow in excess of rate</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-4294967295"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="rate"> +      <properties> +        <help>Maximum average matching rate</help> +        <valueHelp> +          <format>txt</format> +          <description>integer/unit (Example: 5/minute)</description> +        </valueHelp> +        <constraint> +          <regex>\d+/(second|minute|hour|day)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +<leafNode name="log"> +  <properties> +    <help>Option to log packets matching rule</help> +    <completionHelp> +      <list>enable disable</list> +    </completionHelp> +    <valueHelp> +      <format>enable</format> +      <description>Enable log</description> +    </valueHelp> +    <valueHelp> +      <format>disable</format> +      <description>Disable log</description> +    </valueHelp> +    <constraint> +      <regex>(enable|disable)</regex> +    </constraint> +  </properties> +</leafNode> +#include <include/firewall/rule-log-options.xml.i> +<node name="connection-status"> +  <properties> +    <help>Connection status</help> +  </properties> +  <children> +    <leafNode name="nat"> +      <properties> +        <help>NAT connection status</help> +        <completionHelp> +          <list>destination source</list> +        </completionHelp> +        <valueHelp> +          <format>destination</format> +          <description>Match connections that are subject to destination NAT</description> +        </valueHelp> +        <valueHelp> +          <format>source</format> +          <description>Match connections that are subject to source NAT</description> +        </valueHelp> +        <constraint> +          <regex>(destination|source)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +<leafNode name="protocol"> +  <properties> +    <help>Protocol to match (protocol name, number, or "all")</help> +    <completionHelp> +      <script>${vyos_completion_dir}/list_protocols.sh</script> +      <list>all tcp_udp</list> +    </completionHelp> +    <valueHelp> +      <format>all</format> +      <description>All IP protocols</description> +    </valueHelp> +    <valueHelp> +      <format>tcp_udp</format> +      <description>Both TCP and UDP</description> +    </valueHelp> +    <valueHelp> +      <format>u32:0-255</format> +      <description>IP protocol number</description> +    </valueHelp> +    <valueHelp> +      <format><protocol></format> +      <description>IP protocol name</description> +    </valueHelp> +    <valueHelp> +      <format>!<protocol></format> +      <description>IP protocol name</description> +    </valueHelp> +    <constraint> +      <validator name="ip-protocol"/> +    </constraint> +  </properties> +</leafNode> +<node name="recent"> +  <properties> +    <help>Parameters for matching recently seen sources</help> +  </properties> +  <children> +    <leafNode name="count"> +      <properties> +        <help>Source addresses seen more than N times</help> +        <valueHelp> +          <format>u32:1-255</format> +          <description>Source addresses seen more than N times</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 1-255"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="time"> +      <properties> +        <help>Source addresses seen in the last second/minute/hour</help> +        <completionHelp> +          <list>second minute hour</list> +        </completionHelp> +        <valueHelp> +          <format>second</format> +          <description>Source addresses seen COUNT times in the last second</description> +        </valueHelp> +        <valueHelp> +          <format>minute</format> +          <description>Source addresses seen COUNT times in the last minute</description> +        </valueHelp> +        <valueHelp> +          <format>hour</format> +          <description>Source addresses seen COUNT times in the last hour</description> +        </valueHelp> +        <constraint> +          <regex>(second|minute|hour)</regex> +        </constraint> +      </properties> +    </leafNode> +  </children> +</node> +<node name="source"> +  <properties> +    <help>Source parameters</help> +  </properties> +  <children> +    #include <include/firewall/address.xml.i> +    #include <include/firewall/address-mask.xml.i> +    #include <include/firewall/fqdn.xml.i> +    #include <include/firewall/geoip.xml.i> +    #include <include/firewall/mac-address.xml.i> +    #include <include/firewall/port.xml.i> +    #include <include/firewall/source-destination-group.xml.i> +  </children> +</node> +#include <include/firewall/tcp-flags.xml.i> +<node name="time"> +  <properties> +    <help>Time to match rule</help> +  </properties> +  <children> +    <leafNode name="startdate"> +      <properties> +        <help>Date to start matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter date using following notation - YYYY-MM-DD</description> +        </valueHelp> +        <constraint> +          <regex>(\d{4}\-\d{2}\-\d{2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="starttime"> +      <properties> +        <help>Time of day to start matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter time using using 24 hour notation - hh:mm:ss</description> +        </valueHelp> +        <constraint> +          <regex>([0-2][0-9](\:[0-5][0-9]){1,2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="stopdate"> +      <properties> +        <help>Date to stop matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter date using following notation - YYYY-MM-DD</description> +        </valueHelp> +        <constraint> +          <regex>(\d{4}\-\d{2}\-\d{2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="stoptime"> +      <properties> +        <help>Time of day to stop matching rule</help> +        <valueHelp> +          <format>txt</format> +          <description>Enter time using using 24 hour notation - hh:mm:ss</description> +        </valueHelp> +        <constraint> +          <regex>([0-2][0-9](\:[0-5][0-9]){1,2})</regex> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="weekdays"> +      <properties> +        <help>Comma separated weekdays to match rule on</help> +        <valueHelp> +          <format>txt</format> +          <description>Name of day (Monday, Tuesday, Wednesday, Thursdays, Friday, Saturday, Sunday)</description> +        </valueHelp> +        <valueHelp> +          <format>u32:0-6</format> +          <description>Day number (0 = Sunday ... 6 = Saturday)</description> +        </valueHelp> +      </properties> +    </leafNode> +  </children> +</node> +<!-- include end --> diff --git a/interface-definitions/include/firewall/common-rule-ipv4.xml.i b/interface-definitions/include/firewall/common-rule-ipv4.xml.i new file mode 100644 index 000000000..4ed179ae7 --- /dev/null +++ b/interface-definitions/include/firewall/common-rule-ipv4.xml.i @@ -0,0 +1,72 @@ +<!-- include start from firewall/common-rule-ipv4.xml.i --> +#include <include/firewall/common-rule-inet.xml.i> +#include <include/firewall/ttl.xml.i> +<node name="destination"> +  <properties> +    <help>Destination parameters</help> +  </properties> +  <children> +    #include <include/firewall/address.xml.i> +    #include <include/firewall/address-mask.xml.i> +    #include <include/firewall/fqdn.xml.i> +    #include <include/firewall/geoip.xml.i> +    #include <include/firewall/mac-address.xml.i> +    #include <include/firewall/port.xml.i> +    #include <include/firewall/source-destination-group.xml.i> +  </children> +</node> +<node name="icmp"> +  <properties> +    <help>ICMP type and code information</help> +  </properties> +  <children> +    <leafNode name="code"> +      <properties> +        <help>ICMP code</help> +        <valueHelp> +          <format>u32:0-255</format> +          <description>ICMP code (0-255)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-255"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="type"> +      <properties> +        <help>ICMP type</help> +        <valueHelp> +          <format>u32:0-255</format> +          <description>ICMP type (0-255)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-255"/> +        </constraint> +      </properties> +    </leafNode> +    #include <include/firewall/icmp-type-name.xml.i> +  </children> +</node> +<leafNode name="jump-target"> +  <properties> +    <help>Set jump target. Action jump must be defined to use this setting</help> +    <completionHelp> +      <path>firewall ipv4 name</path> +    </completionHelp> +  </properties> +</leafNode> +<node name="source"> +  <properties> +    <help>Source parameters</help> +  </properties> +  <children> +    #include <include/firewall/address.xml.i> +    #include <include/firewall/address-mask.xml.i> +    #include <include/firewall/fqdn.xml.i> +    #include <include/firewall/geoip.xml.i> +    #include <include/firewall/mac-address.xml.i> +    #include <include/firewall/port.xml.i> +    #include <include/firewall/source-destination-group.xml.i> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/common-rule-ipv6.xml.i b/interface-definitions/include/firewall/common-rule-ipv6.xml.i new file mode 100644 index 000000000..6219557db --- /dev/null +++ b/interface-definitions/include/firewall/common-rule-ipv6.xml.i @@ -0,0 +1,72 @@ +<!-- include start from firewall/common-rule-ipv6.xml.i --> +#include <include/firewall/common-rule-inet.xml.i> +#include <include/firewall/hop-limit.xml.i> +<node name="destination"> +  <properties> +    <help>Destination parameters</help> +  </properties> +  <children> +    #include <include/firewall/address-ipv6.xml.i> +    #include <include/firewall/address-mask-ipv6.xml.i> +    #include <include/firewall/fqdn.xml.i> +    #include <include/firewall/geoip.xml.i> +    #include <include/firewall/mac-address.xml.i> +    #include <include/firewall/port.xml.i> +    #include <include/firewall/source-destination-group-ipv6.xml.i> +  </children> +</node> +<node name="icmpv6"> +  <properties> +    <help>ICMPv6 type and code information</help> +  </properties> +  <children> +    <leafNode name="code"> +      <properties> +        <help>ICMPv6 code</help> +        <valueHelp> +          <format>u32:0-255</format> +          <description>ICMPv6 code (0-255)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-255"/> +        </constraint> +      </properties> +    </leafNode> +    <leafNode name="type"> +      <properties> +        <help>ICMPv6 type</help> +        <valueHelp> +          <format>u32:0-255</format> +          <description>ICMPv6 type (0-255)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 0-255"/> +        </constraint> +      </properties> +    </leafNode> +    #include <include/firewall/icmpv6-type-name.xml.i> +  </children> +</node> +<leafNode name="jump-target"> +  <properties> +    <help>Set jump target. Action jump must be defined to use this setting</help> +    <completionHelp> +      <path>firewall ipv6 name</path> +    </completionHelp> +  </properties> +</leafNode> +<node name="source"> +  <properties> +    <help>Source parameters</help> +  </properties> +  <children> +    #include <include/firewall/address-ipv6.xml.i> +    #include <include/firewall/address-mask-ipv6.xml.i> +    #include <include/firewall/fqdn.xml.i> +    #include <include/firewall/geoip.xml.i> +    #include <include/firewall/mac-address.xml.i> +    #include <include/firewall/port.xml.i> +    #include <include/firewall/source-destination-group-ipv6.xml.i> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/default-action-base-chains.xml.i b/interface-definitions/include/firewall/default-action-base-chains.xml.i new file mode 100644 index 000000000..aa62abf3d --- /dev/null +++ b/interface-definitions/include/firewall/default-action-base-chains.xml.i @@ -0,0 +1,22 @@ +<!-- include start from firewall/default-action-base-chains.xml.i --> +<leafNode name="default-action"> +  <properties> +    <help>Default-action for rule-set</help> +    <completionHelp> +      <list>drop accept</list> +    </completionHelp> +    <valueHelp> +      <format>drop</format> +      <description>Drop if no prior rules are hit</description> +    </valueHelp> +    <valueHelp> +      <format>accept</format> +      <description>Accept if no prior rules are hit</description> +    </valueHelp> +    <constraint> +      <regex>(drop|accept)</regex> +    </constraint> +  </properties> +  <defaultValue>accept</defaultValue> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/include/firewall/firewall-hashing-parameters.xml.i b/interface-definitions/include/firewall/firewall-hashing-parameters.xml.i new file mode 100644 index 000000000..7f34de3ba --- /dev/null +++ b/interface-definitions/include/firewall/firewall-hashing-parameters.xml.i @@ -0,0 +1,35 @@ +<!-- include start from firewall/firewall-hashing-parameters.xml.i --> +<leafNode name="hash"> +  <properties> +    <help>Define the parameters of the packet header to apply the hashing</help> +    <completionHelp> +      <list>source-address destination-address source-port destination-port random</list> +    </completionHelp> +    <valueHelp> +      <format>source-address</format> +      <description>Use source IP address for hashing</description> +    </valueHelp> +    <valueHelp> +      <format>destination-address</format> +      <description>Use destination IP address for hashing</description> +    </valueHelp> +    <valueHelp> +      <format>source-port</format> +      <description>Use source port for hashing</description> +    </valueHelp> +    <valueHelp> +      <format>destination-port</format> +      <description>Use destination port for hashing</description> +    </valueHelp> +    <valueHelp> +      <format>random</format> +      <description>Do not use information from ip header. Use random value.</description> +    </valueHelp> +    <constraint> +      <regex>(source-address|destination-address|source-port|destination-port|random)</regex> +    </constraint> +    <multi/> +  </properties> +  <defaultValue>random</defaultValue> +</leafNode> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/global-options.xml.i b/interface-definitions/include/firewall/global-options.xml.i new file mode 100644 index 000000000..a63874cb0 --- /dev/null +++ b/interface-definitions/include/firewall/global-options.xml.i @@ -0,0 +1,252 @@ +<!-- include start from firewall/global-options.xml.i --> +<node name="global-options"> +  <properties> +    <help>Global Options</help> +  </properties> +  <children> +    <leafNode name="all-ping"> +      <properties> +        <help>Policy for handling of all IPv4 ICMP echo requests</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable processing of all IPv4 ICMP echo requests</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable processing of all IPv4 ICMP echo requests</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>enable</defaultValue> +    </leafNode> +    <leafNode name="broadcast-ping"> +      <properties> +        <help>Policy for handling broadcast IPv4 ICMP echo and timestamp requests</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable processing of broadcast IPv4 ICMP echo/timestamp requests</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable processing of broadcast IPv4 ICMP echo/timestamp requests</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +    <leafNode name="ip-src-route"> +      <properties> +        <help>Policy for handling IPv4 packets with source route option</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable processing of IPv4 packets with source route option</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable processing of IPv4 packets with source route option</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +    <leafNode name="log-martians"> +      <properties> +        <help>Policy for logging IPv4 packets with invalid addresses</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable logging of IPv4 packets with invalid addresses</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable logging of Ipv4 packets with invalid addresses</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>enable</defaultValue> +    </leafNode> +    <leafNode name="receive-redirects"> +      <properties> +        <help>Policy for handling received IPv4 ICMP redirect messages</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable processing of received IPv4 ICMP redirect messages</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable processing of received IPv4 ICMP redirect messages</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +    <leafNode name="resolver-cache"> +      <properties> +        <help>Retains last successful value if domain resolution fails</help> +        <valueless/> +      </properties> +    </leafNode> +    <leafNode name="resolver-interval"> +      <properties> +        <help>Domain resolver update interval</help> +        <valueHelp> +          <format>u32:10-3600</format> +          <description>Interval (seconds)</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 10-3600"/> +        </constraint> +      </properties> +      <defaultValue>300</defaultValue> +    </leafNode> +    <leafNode name="send-redirects"> +      <properties> +        <help>Policy for sending IPv4 ICMP redirect messages</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable sending IPv4 ICMP redirect messages</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable sending IPv4 ICMP redirect messages</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>enable</defaultValue> +    </leafNode> +    <leafNode name="source-validation"> +      <properties> +        <help>Policy for source validation by reversed path, as specified in RFC3704</help> +        <completionHelp> +          <list>strict loose disable</list> +        </completionHelp> +        <valueHelp> +          <format>strict</format> +          <description>Enable Strict Reverse Path Forwarding as defined in RFC3704</description> +        </valueHelp> +        <valueHelp> +          <format>loose</format> +          <description>Enable Loose Reverse Path Forwarding as defined in RFC3704</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>No source validation</description> +        </valueHelp> +        <constraint> +          <regex>(strict|loose|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +    <leafNode name="syn-cookies"> +      <properties> +        <help>Policy for using TCP SYN cookies with IPv4</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable use of TCP SYN cookies with IPv4</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable use of TCP SYN cookies with IPv4</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>enable</defaultValue> +    </leafNode> +    <leafNode name="twa-hazards-protection"> +      <properties> +        <help>RFC1337 TCP TIME-WAIT assasination hazards protection</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable RFC1337 TIME-WAIT hazards protection</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable RFC1337 TIME-WAIT hazards protection</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +    <leafNode name="ipv6-receive-redirects"> +      <properties> +        <help>Policy for handling received ICMPv6 redirect messages</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable processing of received ICMPv6 redirect messages</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable processing of received ICMPv6 redirect messages</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +    <leafNode name="ipv6-src-route"> +      <properties> +        <help>Policy for handling IPv6 packets with routing extension header</help> +        <completionHelp> +          <list>enable disable</list> +        </completionHelp> +        <valueHelp> +          <format>enable</format> +          <description>Enable processing of IPv6 packets with routing header type 2</description> +        </valueHelp> +        <valueHelp> +          <format>disable</format> +          <description>Disable processing of IPv6 packets with routing header</description> +        </valueHelp> +        <constraint> +          <regex>(enable|disable)</regex> +        </constraint> +      </properties> +      <defaultValue>disable</defaultValue> +    </leafNode> +  </children> +</node> +<!-- include end --> diff --git a/interface-definitions/include/firewall/inbound-interface.xml.i b/interface-definitions/include/firewall/inbound-interface.xml.i new file mode 100644 index 000000000..13df71de3 --- /dev/null +++ b/interface-definitions/include/firewall/inbound-interface.xml.i @@ -0,0 +1,10 @@ +<!-- include start from firewall/inbound-interface.xml.i --> +<node name="inbound-interface"> +  <properties> +    <help>Match inbound-interface</help> +  </properties> +  <children> +    #include <include/firewall/match-interface.xml.i> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv4-custom-name.xml.i b/interface-definitions/include/firewall/ipv4-custom-name.xml.i new file mode 100644 index 000000000..9d6ecfaf2 --- /dev/null +++ b/interface-definitions/include/firewall/ipv4-custom-name.xml.i @@ -0,0 +1,41 @@ +<!-- include start from firewall/ipv4-custom-name.xml.i --> +<tagNode name="name"> +  <properties> +    <help>IPv4 custom firewall</help> +    <constraint> +      <regex>[a-zA-Z0-9][\w\-\.]*</regex> +    </constraint> +  </properties> +  <children> +    #include <include/firewall/default-action.xml.i> +    #include <include/firewall/enable-default-log.xml.i> +    #include <include/generic-description.xml.i> +    <leafNode name="default-jump-target"> +      <properties> +        <help>Set jump target. Action jump must be defined in default-action to use this setting</help> +        <completionHelp> +          <path>firewall ipv4 name</path> +        </completionHelp> +      </properties> +    </leafNode> +    <tagNode name="rule"> +      <properties> +        <help>IPv4 Firewall custom rule number</help> +        <valueHelp> +          <format>u32:1-999999</format> +          <description>Number for this firewall rule</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 1-999999"/> +        </constraint> +        <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +      </properties> +      <children> +        #include <include/firewall/common-rule-ipv4.xml.i> +        #include <include/firewall/inbound-interface.xml.i> +        #include <include/firewall/outbound-interface.xml.i> +      </children> +    </tagNode> +  </children> +</tagNode> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv4-hook-forward.xml.i b/interface-definitions/include/firewall/ipv4-hook-forward.xml.i new file mode 100644 index 000000000..08ee96419 --- /dev/null +++ b/interface-definitions/include/firewall/ipv4-hook-forward.xml.i @@ -0,0 +1,36 @@ +<!-- include start from firewall/ipv4-hook-forward.xml.i --> +<node name="forward"> +  <properties> +    <help>IPv4 forward firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv4 firewall forward filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv4 Firewall forward filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv4.xml.i> +            #include <include/firewall/inbound-interface.xml.i> +            #include <include/firewall/outbound-interface.xml.i> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv4-hook-input.xml.i b/interface-definitions/include/firewall/ipv4-hook-input.xml.i new file mode 100644 index 000000000..32b0ec94f --- /dev/null +++ b/interface-definitions/include/firewall/ipv4-hook-input.xml.i @@ -0,0 +1,35 @@ +<!-- include start from firewall/ipv4-hook-input.xml.i --> +<node name="input"> +  <properties> +    <help>IPv4 input firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv4 firewall input filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv4 Firewall input filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv4.xml.i> +            #include <include/firewall/inbound-interface.xml.i> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv4-hook-output.xml.i b/interface-definitions/include/firewall/ipv4-hook-output.xml.i new file mode 100644 index 000000000..d50d1e93b --- /dev/null +++ b/interface-definitions/include/firewall/ipv4-hook-output.xml.i @@ -0,0 +1,35 @@ +<!-- include start from firewall/ipv4-hook-output.xml.i --> +<node name="output"> +  <properties> +    <help>IPv4 output firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv4 firewall output filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv4 Firewall output filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv4.xml.i> +            #include <include/firewall/outbound-interface.xml.i> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv4-hook-prerouting.xml.i b/interface-definitions/include/firewall/ipv4-hook-prerouting.xml.i new file mode 100644 index 000000000..c38918375 --- /dev/null +++ b/interface-definitions/include/firewall/ipv4-hook-prerouting.xml.i @@ -0,0 +1,85 @@ +<!-- include start from firewall/ipv4-hook-prerouting.xml.i --> +<node name="prerouting"> +  <properties> +    <help>IPv4 prerouting firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv4 firewall prerouting filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv4 Firewall prerouting filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv4.xml.i> +            #include <include/firewall/inbound-interface.xml.i> +            <leafNode name="jump-target"> +              <properties> +                <help>Set jump target. Action jump must be defined to use this setting</help> +                <completionHelp> +                  <path>firewall ipv4 name</path> +                </completionHelp> +              </properties> +            </leafNode> +          </children> +        </tagNode> +      </children> +    </node> +    <node name="raw"> +      <properties> +        <help>IPv4 firewall prerouting raw</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <leafNode name="default-jump-target"> +          <properties> +            <help>Set jump target. Action jump must be defined in default-action to use this setting</help> +            <completionHelp> +              <path>firewall ipv4 name</path> +            </completionHelp> +          </properties> +        </leafNode> +        <tagNode name="rule"> +          <properties> +            <help>IPv4 Firewall prerouting raw rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv4-raw.xml.i> +            #include <include/firewall/inbound-interface.xml.i> +            <leafNode name="jump-target"> +              <properties> +                <help>Set jump target. Action jump must be defined to use this setting</help> +                <completionHelp> +                  <path>firewall ipv4 name</path> +                </completionHelp> +              </properties> +            </leafNode> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv6-custom-name.xml.i b/interface-definitions/include/firewall/ipv6-custom-name.xml.i new file mode 100644 index 000000000..81610babf --- /dev/null +++ b/interface-definitions/include/firewall/ipv6-custom-name.xml.i @@ -0,0 +1,41 @@ +<!-- include start from firewall/ipv6-custom-name.xml.i --> +<tagNode name="name"> +  <properties> +    <help>IPv6 custom firewall</help> +    <constraint> +      <regex>[a-zA-Z0-9][\w\-\.]*</regex> +    </constraint> +  </properties> +  <children> +    #include <include/firewall/default-action.xml.i> +    #include <include/firewall/enable-default-log.xml.i> +    #include <include/generic-description.xml.i> +    <leafNode name="default-jump-target"> +      <properties> +        <help>Set jump target. Action jump must be defined in default-action to use this setting</help> +        <completionHelp> +          <path>firewall ipv6 name</path> +        </completionHelp> +      </properties> +    </leafNode> +    <tagNode name="rule"> +      <properties> +        <help>IPv6 Firewall custom rule number</help> +        <valueHelp> +          <format>u32:1-999999</format> +          <description>Number for this firewall rule</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--range 1-999999"/> +        </constraint> +        <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +      </properties> +      <children> +        #include <include/firewall/common-rule-ipv6.xml.i> +        #include <include/firewall/inbound-interface.xml.i> +        #include <include/firewall/outbound-interface.xml.i> +      </children> +    </tagNode> +  </children> +</tagNode> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv6-hook-forward.xml.i b/interface-definitions/include/firewall/ipv6-hook-forward.xml.i new file mode 100644 index 000000000..20ab8dbe8 --- /dev/null +++ b/interface-definitions/include/firewall/ipv6-hook-forward.xml.i @@ -0,0 +1,36 @@ +<!-- include start from firewall/ipv6-hook-forward.xml.i --> +<node name="forward"> +  <properties> +    <help>IPv6 forward firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv6 firewall forward filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv6 Firewall forward filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv6.xml.i> +            #include <include/firewall/inbound-interface.xml.i> +            #include <include/firewall/outbound-interface.xml.i> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv6-hook-input.xml.i b/interface-definitions/include/firewall/ipv6-hook-input.xml.i new file mode 100644 index 000000000..e34958f28 --- /dev/null +++ b/interface-definitions/include/firewall/ipv6-hook-input.xml.i @@ -0,0 +1,35 @@ +<!-- include start from firewall/ipv6-hook-input.xml.i --> +<node name="input"> +  <properties> +    <help>IPv6 input firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv6 firewall input filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv6 Firewall input filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv6.xml.i> +            #include <include/firewall/inbound-interface.xml.i> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/ipv6-hook-output.xml.i b/interface-definitions/include/firewall/ipv6-hook-output.xml.i new file mode 100644 index 000000000..eb4ea7ac3 --- /dev/null +++ b/interface-definitions/include/firewall/ipv6-hook-output.xml.i @@ -0,0 +1,35 @@ +<!-- include start from firewall/ipv6-hook-output.xml.i --> +<node name="output"> +  <properties> +    <help>IPv6 output firewall</help> +  </properties> +  <children> +    <node name="filter"> +      <properties> +        <help>IPv6 firewall output filter</help> +      </properties> +      <children> +        #include <include/firewall/default-action-base-chains.xml.i> +        #include <include/generic-description.xml.i> +        <tagNode name="rule"> +          <properties> +            <help>IPv6 Firewall output filter rule number</help> +            <valueHelp> +              <format>u32:1-999999</format> +              <description>Number for this firewall rule</description> +            </valueHelp> +            <constraint> +              <validator name="numeric" argument="--range 1-999999"/> +            </constraint> +            <constraintErrorMessage>Firewall rule number must be between 1 and 999999</constraintErrorMessage> +          </properties> +          <children> +            #include <include/firewall/common-rule-ipv6.xml.i> +            #include <include/firewall/outbound-interface.xml.i> +          </children> +        </tagNode> +      </children> +    </node> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/match-interface.xml.i b/interface-definitions/include/firewall/match-interface.xml.i index 3e52422cf..a62bf8d89 100644 --- a/interface-definitions/include/firewall/match-interface.xml.i +++ b/interface-definitions/include/firewall/match-interface.xml.i @@ -5,6 +5,13 @@      <completionHelp>        <script>${vyos_completion_dir}/list_interfaces</script>      </completionHelp> +    <valueHelp> +      <format>txt</format> +      <description>Interface name, wildcard (*) supported</description> +    </valueHelp> +    <constraint> +      #include <include/constraint/interface-name-with-wildcard.xml.i> +    </constraint>    </properties>  </leafNode>  <leafNode name="interface-group"> diff --git a/interface-definitions/include/firewall/nat-balance.xml.i b/interface-definitions/include/firewall/nat-balance.xml.i new file mode 100644 index 000000000..01793f06b --- /dev/null +++ b/interface-definitions/include/firewall/nat-balance.xml.i @@ -0,0 +1,28 @@ +<!-- include start from firewall/nat-balance.xml.i --> +<tagNode name="backend"> +  <properties> +    <help>Translated IP address</help> +    <valueHelp> +      <format>ipv4</format> +      <description>IPv4 address to match</description> +    </valueHelp> +    <constraint> +      <validator name="ipv4-address"/> +    </constraint> +  </properties> +  <children> +    <leafNode name="weight"> +      <properties> +        <help>Set probability for this output value</help> +        <valueHelp> +          <format>u32:1-100</format> +          <description>Set probability for this output value</description> +        </valueHelp> +        <constraint> +          <validator name="numeric" argument="--allow-range --range 1-100"/> +        </constraint> +      </properties> +    </leafNode> +  </children> +</tagNode> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/firewall/outbound-interface.xml.i b/interface-definitions/include/firewall/outbound-interface.xml.i new file mode 100644 index 000000000..8654dfd80 --- /dev/null +++ b/interface-definitions/include/firewall/outbound-interface.xml.i @@ -0,0 +1,10 @@ +<!-- include start from firewall/outbound-interface.xml.i --> +<node name="outbound-interface"> +  <properties> +    <help>Match outbound-interface</help> +  </properties> +  <children> +    #include <include/firewall/match-interface.xml.i> +  </children> +</node> +<!-- include end -->
\ No newline at end of file diff --git a/interface-definitions/include/interface/dhcpv6-options.xml.i b/interface-definitions/include/interface/dhcpv6-options.xml.i index 609af1a2b..5ca1d525f 100644 --- a/interface-definitions/include/interface/dhcpv6-options.xml.i +++ b/interface-definitions/include/interface/dhcpv6-options.xml.i @@ -95,6 +95,12 @@          <valueless/>        </properties>      </leafNode> +    <leafNode name="no-release"> +      <properties> +        <help>Do not send a release message on client exit</help> +        <valueless/> +      </properties> +    </leafNode>    </children>  </node>  <!-- include end --> diff --git a/interface-definitions/include/interface/ipv6-accept-dad.xml.i b/interface-definitions/include/interface/ipv6-accept-dad.xml.i new file mode 100644 index 000000000..7554b270a --- /dev/null +++ b/interface-definitions/include/interface/ipv6-accept-dad.xml.i @@ -0,0 +1,20 @@ +<!-- include start from interface/ipv6-accept-dad.xml.i --> +<leafNode name="accept-dad"> +  <properties> +    <help>Accept Duplicate Address Detection</help> +    <valueHelp> +      <format>0</format> +      <description>Disable DAD</description> +    </valueHelp> +    <valueHelp> +      <format>1</format> +      <description>Enable DAD</description> +    </valueHelp> +    <valueHelp> +      <format>2</format> +      <description>Enable DAD - disable IPv6 if MAC-based duplicate link-local address found</description> +    </valueHelp> +  </properties> +  <defaultValue>1</defaultValue> +</leafNode> +<!-- include end --> diff --git a/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i index babe6d20f..3b9294dd0 100644 --- a/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i +++ b/interface-definitions/include/interface/ipv6-dup-addr-detect-transmits.xml.i @@ -1,7 +1,7 @@  <!-- include start from interface/ipv6-dup-addr-detect-transmits.xml.i -->  <leafNode name="dup-addr-detect-transmits">    <properties> -    <help>Number of NS messages to send while performing DAD (default: 1)</help> +    <help>Number of NS messages to send while performing DAD</help>      <valueHelp>        <format>u32:0</format>        <description>Disable Duplicate Address Dectection (DAD)</description> @@ -14,5 +14,6 @@        <validator name="numeric" argument="--non-negative"/>      </constraint>    </properties> +  <defaultValue>1</defaultValue>  </leafNode>  <!-- include end --> diff --git a/interface-definitions/include/interface/ipv6-options.xml.i b/interface-definitions/include/interface/ipv6-options.xml.i index f740ce0c2..d2e47de91 100644 --- a/interface-definitions/include/interface/ipv6-options.xml.i +++ b/interface-definitions/include/interface/ipv6-options.xml.i @@ -6,6 +6,7 @@    <children>      #include <include/interface/adjust-mss.xml.i>      #include <include/interface/disable-forwarding.xml.i> +    #include <include/interface/ipv6-accept-dad.xml.i>      #include <include/interface/ipv6-address.xml.i>      #include <include/interface/ipv6-dup-addr-detect-transmits.xml.i>    </children> diff --git a/interface-definitions/include/nat-rule.xml.i b/interface-definitions/include/nat-rule.xml.i index 7b3b8804e..6234e6195 100644 --- a/interface-definitions/include/nat-rule.xml.i +++ b/interface-definitions/include/nat-rule.xml.i @@ -25,6 +25,15 @@      </node>      #include <include/generic-disable-node.xml.i>      #include <include/nat-exclude.xml.i> +    <node name="load-balance"> +      <properties> +        <help>Apply NAT load balance</help> +      </properties> +      <children> +        #include <include/firewall/firewall-hashing-parameters.xml.i> +        #include <include/firewall/nat-balance.xml.i> +      </children> +    </node>      <leafNode name="log">        <properties>          <help>NAT rule logging</help> diff --git a/interface-definitions/include/version/firewall-version.xml.i b/interface-definitions/include/version/firewall-version.xml.i index c32484542..dd21bfaca 100644 --- a/interface-definitions/include/version/firewall-version.xml.i +++ b/interface-definitions/include/version/firewall-version.xml.i @@ -1,3 +1,3 @@  <!-- include start from include/version/firewall-version.xml.i --> -<syntaxVersion component='firewall' version='10'></syntaxVersion> +<syntaxVersion component='firewall' version='11'></syntaxVersion>  <!-- include end --> diff --git a/interface-definitions/include/version/interfaces-version.xml.i b/interface-definitions/include/version/interfaces-version.xml.i index 4a2b3f9ab..3d11ce888 100644 --- a/interface-definitions/include/version/interfaces-version.xml.i +++ b/interface-definitions/include/version/interfaces-version.xml.i @@ -1,3 +1,3 @@  <!-- include start from include/version/interfaces-version.xml.i --> -<syntaxVersion component='interfaces' version='29'></syntaxVersion> +<syntaxVersion component='interfaces' version='30'></syntaxVersion>  <!-- include end --> diff --git a/interface-definitions/interfaces-openvpn.xml.in b/interface-definitions/interfaces-openvpn.xml.in index 127a8179b..831659250 100644 --- a/interface-definitions/interfaces-openvpn.xml.in +++ b/interface-definitions/interfaces-openvpn.xml.in @@ -752,6 +752,16 @@                    </completionHelp>                  </properties>                </leafNode> +              <leafNode name="peer-fingerprint"> +                <properties> +                  <multi/> +                  <help>Peer certificate SHA256 fingerprint</help> +                  <constraint> +                    <regex>[0-9a-fA-F]{2}:([0-9a-fA-F]{2}:){30}[0-9a-fA-F]{2}</regex> +                  </constraint> +                  <constraintErrorMessage>Peer certificate fingerprint must be a colon-separated SHA256 hex digest</constraintErrorMessage> +                </properties> +              </leafNode>                <leafNode name="tls-version-min">                  <properties>                    <help>Specify the minimum required TLS version</help> diff --git a/interface-definitions/service-monitoring-zabbix-agent.xml.in b/interface-definitions/service-monitoring-zabbix-agent.xml.in new file mode 100644 index 000000000..cfeb02ce0 --- /dev/null +++ b/interface-definitions/service-monitoring-zabbix-agent.xml.in @@ -0,0 +1,184 @@ +<?xml version="1.0"?> +<interfaceDefinition> +  <node name="service"> +    <children> +      <node name="monitoring"> +        <children> +          <node name="zabbix-agent" owner="${vyos_conf_scripts_dir}/service_monitoring_zabbix-agent.py"> +            <properties> +              <help>Zabbix-agent settings</help> +            </properties> +            <children> +              <leafNode name="directory"> +                <properties> +                  <help>Folder containing individual Zabbix-agent configuration files</help> +                  <constraint> +                    <validator name="file-path" argument="--directory"/> +                  </constraint> +                </properties> +              </leafNode> +              <node name="limits"> +                <properties> +                  <help>Limit settings</help> +                </properties> +                <children> +                  <leafNode name="buffer-flush-interval"> +                    <properties> +                      <help>Do not keep data longer than N seconds in buffer</help> +                      <valueHelp> +                        <format>u32:1-3600</format> +                        <description>Seconds</description> +                      </valueHelp> +                      <constraint> +                        <validator name="numeric" argument="--range 1-3600"/> +                      </constraint> +                      <constraintErrorMessage>buffer-flush-interval must be between 1 and 3600 seconds</constraintErrorMessage> +                    </properties> +                    <defaultValue>5</defaultValue> +                  </leafNode> +                  <leafNode name="buffer-size"> +                    <properties> +                      <help>Maximum number of values in a memory buffer</help> +                      <valueHelp> +                        <format>u32:2-65535</format> +                        <description>Maximum number of values in a memory buffer</description> +                      </valueHelp> +                      <constraint> +                        <validator name="numeric" argument="--range 2-65535"/> +                      </constraint> +                      <constraintErrorMessage>Buffer-size must be between 2 and 65535</constraintErrorMessage> +                    </properties> +                    <defaultValue>100</defaultValue> +                  </leafNode> +                </children> +              </node> +              <node name="log"> +                <properties> +                  <help>Log settings</help> +                </properties> +                <children> +                  <leafNode name="debug-level"> +                    <properties> +                      <help>Debug level</help> +                      <completionHelp> +                        <list>basic critical error warning debug extended-debug</list> +                      </completionHelp> +                      <valueHelp> +                        <format>basic</format> +                        <description>Basic information</description> +                      </valueHelp> +                      <valueHelp> +                        <format>critical</format> +                        <description>Critical information</description> +                      </valueHelp> +                      <valueHelp> +                        <format>error</format> +                        <description>Error information</description> +                      </valueHelp> +                      <valueHelp> +                        <format>warning</format> +                        <description>Warnings</description> +                      </valueHelp> +                      <valueHelp> +                        <format>debug</format> +                        <description>Debug information</description> +                      </valueHelp> +                      <valueHelp> +                        <format>extended-debug</format> +                        <description>Extended debug information</description> +                      </valueHelp> +                      <constraint> +                        <regex>(basic|critical|error|warning|debug|extended-debug)</regex> +                      </constraint> +                    </properties> +                    <defaultValue>warning</defaultValue> +                  </leafNode> +                  <leafNode name="remote-commands"> +                    <properties> +                      <help>Enable logging of executed shell commands as warnings</help> +                      <valueless/> +                    </properties> +                  </leafNode> +                  <leafNode name="size"> +                    <properties> +                      <help>Log file size in megabytes</help> +                      <valueHelp> +                        <format>u32:0-1024</format> +                        <description>Megabytes</description> +                      </valueHelp> +                      <constraint> +                        <validator name="numeric" argument="--range 0-1024"/> +                      </constraint> +                      <constraintErrorMessage>Size must be between 0 and 1024 Megabytes</constraintErrorMessage> +                    </properties> +                    <defaultValue>0</defaultValue> +                  </leafNode> +                </children> +              </node> +              #include <include/listen-address.xml.i> +              <leafNode name="listen-address"> +                <defaultValue>0.0.0.0</defaultValue> +              </leafNode> +              #include <include/port-number.xml.i> +              <leafNode name="port"> +                <defaultValue>10050</defaultValue> +              </leafNode> +              <leafNode name="server"> +                <properties> +                  <help>Remote server to connect to</help> +                  <valueHelp> +                    <format>ipv4</format> +                    <description>Server IPv4 address</description> +                  </valueHelp> +                  <valueHelp> +                    <format>ipv6</format> +                    <description>Server IPv6 address</description> +                  </valueHelp> +                  <valueHelp> +                    <format>hostname</format> +                    <description>Server hostname/FQDN</description> +                  </valueHelp> +                  <multi/> +                </properties> +              </leafNode> +              <tagNode name="server-active"> +                <properties> +                  <help>Remote server address to get active checks from</help> +                  <valueHelp> +                    <format>ipv4</format> +                    <description>Server IPv4 address</description> +                  </valueHelp> +                  <valueHelp> +                    <format>ipv6</format> +                    <description>Server IPv6 address</description> +                  </valueHelp> +                  <valueHelp> +                    <format>hostname</format> +                    <description>Server hostname/FQDN</description> +                  </valueHelp> +                </properties> +                <children> +                  #include <include/port-number.xml.i> +                </children> +              </tagNode> +              <leafNode name="timeout"> +                <properties> +                  <help>Item processing timeout in seconds</help> +                  <valueHelp> +                    <format>u32:1-30</format> +                    <description>Item processing timeout</description> +                  </valueHelp> +                  <constraint> +                    <validator name="numeric" argument="--range 1-30"/> +                  </constraint> +                  <constraintErrorMessage>Timeout must be between 1 and 30 seconds</constraintErrorMessage> +                </properties> +                <defaultValue>3</defaultValue> +              </leafNode> +            </children> +          </node> +        </children> +      </node> +    </children> +  </node> +</interfaceDefinition> diff --git a/interface-definitions/system-option.xml.in b/interface-definitions/system-option.xml.in index efab50a66..b1b5f7fae 100644 --- a/interface-definitions/system-option.xml.in +++ b/interface-definitions/system-option.xml.in @@ -144,6 +144,26 @@                 <valueless/>               </properties>             </leafNode> +           <leafNode name="time-format"> +            <properties> +              <help>System time-format</help> +              <completionHelp> +                <list>12-hour 24-hour</list> +              </completionHelp> +              <valueHelp> +                <format>12-hour</format> +                <description>12 hour time format</description> +              </valueHelp> +              <valueHelp> +                <format>24-hour</format> +                <description>24 hour time format</description> +              </valueHelp> +              <constraint> +                <regex>(12-hour|24-hour)</regex> +              </constraint> +            </properties> +            <defaultValue>12-hour</defaultValue> +           </leafNode>          </children>        </node>      </children> | 
