diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-08 14:51:40 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-08 14:51:40 -0800 |
commit | 2ea5ac4cd9901a604ce92fc6836cef7dac946a09 (patch) | |
tree | 0494c8b95ba636b36a96b50f8ef15ced7aa7999d /templates-cfg | |
parent | 21b09233076a75bed7cd31177a5f52af40f572f9 (diff) | |
download | vyatta-nat-2ea5ac4cd9901a604ce92fc6836cef7dac946a09.tar.gz vyatta-nat-2ea5ac4cd9901a604ce92fc6836cef7dac946a09.zip |
fix for bug 2791: merge port configuration options.
Diffstat (limited to 'templates-cfg')
22 files changed, 26 insertions, 62 deletions
diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port-name/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port-name/node.def deleted file mode 100644 index 8451614..0000000 --- a/templates-cfg/service/nat/rule/node.tag/destination/port-name/node.def +++ /dev/null @@ -1,10 +0,0 @@ -multi: -type: txt -help: Named destination port (e.g., http) -syntax:expression: exec "sh -c 'if grep -q '\\''^$VAR(@)[ \t]'\\'' /etc/services; \ -then exit 0; else \ - if grep -q \ - '\\''^[^ \t]\\+[ \t]\\+[^ \t]\\+[^#]*[ \t]$VAR(@)\\([ \t]\\|$\\)'\\'' \ - /etc/services; then exit 0; else exit 1; \ - fi; \ -fi' " ; "invalid port name $VAR(@)" diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port-number/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port-number/node.def deleted file mode 100644 index 6294dd3..0000000 --- a/templates-cfg/service/nat/rule/node.tag/destination/port-number/node.def +++ /dev/null @@ -1,4 +0,0 @@ -multi: -type: u32 -help: Numbered destination port (ex. 80) -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port-range/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port-range/node.def deleted file mode 100644 index 643d751..0000000 --- a/templates-cfg/service/nat/rule/node.tag/destination/port-range/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Range of destination ports (ex. 80-110) diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port-range/start/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port-range/start/node.def deleted file mode 100644 index 59ba6bb..0000000 --- a/templates-cfg/service/nat/rule/node.tag/destination/port-range/start/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Starting destination port range -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port-range/stop/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port-range/stop/node.def deleted file mode 100644 index a13fefd..0000000 --- a/templates-cfg/service/nat/rule/node.tag/destination/port-range/stop/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Ending destination port range -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/destination/port/node.def b/templates-cfg/service/nat/rule/node.tag/destination/port/node.def new file mode 100644 index 0000000..6f655d7 --- /dev/null +++ b/templates-cfg/service/nat/rule/node.tag/destination/port/node.def @@ -0,0 +1,8 @@ +type: txt +help: Configure destination port +comp_help: Destination port(s) can be specified as a comma-separated list of: + <port name> Named port (any name in /etc/services, e.g., http) + <port number> Numbered port (between 1 and 65535) + <start>-<end> Numbered port range (e.g., 1001-1005) +The whole list can also be "negated" using '!'. For example: + '!22,telnet,http,123,1001-1005' diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/port-number/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/port-number/node.def deleted file mode 100644 index b080b3c..0000000 --- a/templates-cfg/service/nat/rule/node.tag/inside-address/port-number/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Inside port to NAT -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/node.def deleted file mode 100644 index fe4dfd1..0000000 --- a/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Inside port range to NAT diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/start/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/start/node.def deleted file mode 100644 index fe0d60b..0000000 --- a/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/start/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Inside port range start -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/stop/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/stop/node.def deleted file mode 100644 index ba772c6..0000000 --- a/templates-cfg/service/nat/rule/node.tag/inside-address/port-range/stop/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Inside port range stop -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def b/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def new file mode 100644 index 0000000..f3e02c2 --- /dev/null +++ b/templates-cfg/service/nat/rule/node.tag/inside-address/port/node.def @@ -0,0 +1,5 @@ +type: txt +help: Configure inside port +comp_help: The inside port can be one of the following: + <port number> Numbered port (between 1 and 65535) + <start>-<end> Numbered port range (e.g., 1001-1005) diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/port-number/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/port-number/node.def deleted file mode 100644 index 4253066..0000000 --- a/templates-cfg/service/nat/rule/node.tag/outside-address/port-number/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Outside port to NAT -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/node.def deleted file mode 100644 index 0145cee..0000000 --- a/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Outside port range to NAT diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/start/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/start/node.def deleted file mode 100644 index 9905c7a..0000000 --- a/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/start/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Outside port range start -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/stop/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/stop/node.def deleted file mode 100644 index a84522c..0000000 --- a/templates-cfg/service/nat/rule/node.tag/outside-address/port-range/stop/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Outside port range stop -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def b/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def new file mode 100644 index 0000000..2b94d31 --- /dev/null +++ b/templates-cfg/service/nat/rule/node.tag/outside-address/port/node.def @@ -0,0 +1,5 @@ +type: txt +help: Configure outside port +comp_help: The outside port can be one of the following: + <port number> Numbered port (between 1 and 65535) + <start>-<end> Numbered port range (e.g., 1001-1005) diff --git a/templates-cfg/service/nat/rule/node.tag/source/port-name/node.def b/templates-cfg/service/nat/rule/node.tag/source/port-name/node.def deleted file mode 100644 index 01f25da..0000000 --- a/templates-cfg/service/nat/rule/node.tag/source/port-name/node.def +++ /dev/null @@ -1,10 +0,0 @@ -multi: -type: txt -help: Named source port (e.g., http) -syntax:expression: exec "sh -c 'if grep -q '\\''^$VAR(@)[ \t]'\\'' /etc/services; \ -then exit 0; else \ - if grep -q \ - '\\''^[^ \t]\\+[ \t]\\+[^ \t]\\+[^#]*[ \t]$VAR(@)\\([ \t]\\|$\\)'\\'' \ - /etc/services; then exit 0; else exit 1; \ - fi; \ -fi' " ; "invalid port name $VAR(@)" diff --git a/templates-cfg/service/nat/rule/node.tag/source/port-number/node.def b/templates-cfg/service/nat/rule/node.tag/source/port-number/node.def deleted file mode 100644 index 1db91e0..0000000 --- a/templates-cfg/service/nat/rule/node.tag/source/port-number/node.def +++ /dev/null @@ -1,4 +0,0 @@ -multi: -type: u32 -help: Numbered source port (ex. 80) -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/source/port-range/node.def b/templates-cfg/service/nat/rule/node.tag/source/port-range/node.def deleted file mode 100644 index eb2aadb..0000000 --- a/templates-cfg/service/nat/rule/node.tag/source/port-range/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Range of source ports (ex. 80-110) diff --git a/templates-cfg/service/nat/rule/node.tag/source/port-range/start/node.def b/templates-cfg/service/nat/rule/node.tag/source/port-range/start/node.def deleted file mode 100644 index ec67963..0000000 --- a/templates-cfg/service/nat/rule/node.tag/source/port-range/start/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Starting source port range -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/source/port-range/stop/node.def b/templates-cfg/service/nat/rule/node.tag/source/port-range/stop/node.def deleted file mode 100644 index 94c573e..0000000 --- a/templates-cfg/service/nat/rule/node.tag/source/port-range/stop/node.def +++ /dev/null @@ -1,3 +0,0 @@ -type: u32 -help: Ending source port range -syntax:expression: ($VAR(@) > 0 && $VAR(@) < 65536) ; "port must be between 1 and 65535" diff --git a/templates-cfg/service/nat/rule/node.tag/source/port/node.def b/templates-cfg/service/nat/rule/node.tag/source/port/node.def new file mode 100644 index 0000000..1973f1c --- /dev/null +++ b/templates-cfg/service/nat/rule/node.tag/source/port/node.def @@ -0,0 +1,8 @@ +type: txt +help: Configure source port +comp_help: Source port(s) can be specified as a comma-separated list of: + <port name> Named port (any name in /etc/services, e.g., http) + <port number> Numbered port (between 1 and 65535) + <start>-<end> Numbered port range (e.g., 1001-1005) +The whole list can also be "negated" using '!'. For example: + '!22,telnet,http,123,1001-1005' |