diff options
Diffstat (limited to 'templates-cfg/nat/nptv6')
7 files changed, 62 insertions, 0 deletions
diff --git a/templates-cfg/nat/nptv6/node.def b/templates-cfg/nat/nptv6/node.def new file mode 100644 index 0000000..be59537 --- /dev/null +++ b/templates-cfg/nat/nptv6/node.def @@ -0,0 +1,3 @@ +help: NPTv6 settings + +end:expression: "sudo /opt/vyatta/sbin/vyos-update-nptv6.pl" diff --git a/templates-cfg/nat/nptv6/rule/node.def b/templates-cfg/nat/nptv6/rule/node.def new file mode 100644 index 0000000..c666be9 --- /dev/null +++ b/templates-cfg/nat/nptv6/rule/node.def @@ -0,0 +1,11 @@ +tag: + +type: u32 + +help: Rule number for NAT + +syntax:expression: ($VAR(@) > 0 && $VAR(@) < 10000) ; \ + "Rule number must be between 1 and 9999." + +val_help: u32:1-9999 ; Number for this NAT rule + diff --git a/templates-cfg/nat/nptv6/rule/node.tag/description/node.def b/templates-cfg/nat/nptv6/rule/node.tag/description/node.def new file mode 100644 index 0000000..90bf88b --- /dev/null +++ b/templates-cfg/nat/nptv6/rule/node.tag/description/node.def @@ -0,0 +1,3 @@ +type: txt + +help: Rule description diff --git a/templates-cfg/nat/nptv6/rule/node.tag/disable/node.def b/templates-cfg/nat/nptv6/rule/node.tag/disable/node.def new file mode 100644 index 0000000..c23fc5a --- /dev/null +++ b/templates-cfg/nat/nptv6/rule/node.tag/disable/node.def @@ -0,0 +1 @@ +help: Disable NAT rule diff --git a/templates-cfg/nat/nptv6/rule/node.tag/inside-prefix/node.def b/templates-cfg/nat/nptv6/rule/node.tag/inside-prefix/node.def new file mode 100644 index 0000000..7af7091 --- /dev/null +++ b/templates-cfg/nat/nptv6/rule/node.tag/inside-prefix/node.def @@ -0,0 +1,7 @@ +type: txt + +help: Inside prefix to be translated + +val_help: ipv6net; IPv6 prefix to match + +syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type ipv6_addr_param $VAR(@)" diff --git a/templates-cfg/nat/nptv6/rule/node.tag/outside-interface/node.def b/templates-cfg/nat/nptv6/rule/node.tag/outside-interface/node.def new file mode 100644 index 0000000..d0954ad --- /dev/null +++ b/templates-cfg/nat/nptv6/rule/node.tag/outside-interface/node.def @@ -0,0 +1,30 @@ +type: txt + +help: Outside interface of NPTv6 traffic + +enumeration: existing-interfaces; echo "any" + +val_help: <interface> ; Interface name or "any" + +commit:expression: exec " + if [ \"any\" == \"$VAR(@)\" ] ; then + exit 0 + fi + intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev)) + intf_array_len=${#intf_array[*]} + i=0 + while [ $i -lt $intf_array_len ]; do + temp=${intf_array[$i]%:*} + if [ \"$temp\" == \"$VAR(@)\" ] ; then + exit 0 + fi + let i++ + done + intf_group_name_array=\"eth+ bond+ br+ peth+ vtun+ tun+ wlm+ wlan+\" + i=0 + for i in $intf_group_name_array; do + if [ \"$i\" == \"$VAR(@)\" ]; then + exit 0 + fi + done + echo NPTv6 configuration warning: interface $VAR(@) does not exist on this system " diff --git a/templates-cfg/nat/nptv6/rule/node.tag/outside-prefix/node.def b/templates-cfg/nat/nptv6/rule/node.tag/outside-prefix/node.def new file mode 100644 index 0000000..7af7091 --- /dev/null +++ b/templates-cfg/nat/nptv6/rule/node.tag/outside-prefix/node.def @@ -0,0 +1,7 @@ +type: txt + +help: Inside prefix to be translated + +val_help: ipv6net; IPv6 prefix to match + +syntax:expression: exec "/opt/vyatta/sbin/vyatta-validate-type ipv6_addr_param $VAR(@)" |