diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-09-01 19:35:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 19:35:15 +0200 |
commit | 735767f09f891c438e43565f935b927e6f1b317d (patch) | |
tree | 81daee7b244db6fea41f76bd70a45e02fce0334b /interface-definitions/nat.xml.in | |
parent | 5c20eac6cd62f9145bc27041db9145b8ba231fa0 (diff) | |
parent | 3489089000a43a533fcd89282b0ced2434851c03 (diff) | |
download | vyos-1x-735767f09f891c438e43565f935b927e6f1b317d.tar.gz vyos-1x-735767f09f891c438e43565f935b927e6f1b317d.zip |
Merge pull request #1466 from sever-sever/T538
nat: T538: Add static NAT one-to-one
Diffstat (limited to 'interface-definitions/nat.xml.in')
-rw-r--r-- | interface-definitions/nat.xml.in | 53 |
1 files changed, 44 insertions, 9 deletions
diff --git a/interface-definitions/nat.xml.in b/interface-definitions/nat.xml.in index 9295b631f..501ff05d3 100644 --- a/interface-definitions/nat.xml.in +++ b/interface-definitions/nat.xml.in @@ -14,15 +14,7 @@ #include <include/nat-rule.xml.i> <tagNode name="rule"> <children> - <leafNode name="inbound-interface"> - <properties> - <help>Inbound interface of NAT traffic</help> - <completionHelp> - <list>any</list> - <script>${vyos_completion_dir}/list_interfaces.py</script> - </completionHelp> - </properties> - </leafNode> + #include <include/inbound-interface.xml.i> <node name="translation"> <properties> <help>Inside NAT IP (destination NAT only)</help> @@ -65,6 +57,17 @@ <children> #include <include/nat-rule.xml.i> <tagNode name="rule"> + <properties> + <help>Rule number for NAT</help> + <valueHelp> + <format>u32:1-999999</format> + <description>Number of NAT rule</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-999999"/> + </constraint> + <constraintErrorMessage>NAT rule number must be between 1 and 999999</constraintErrorMessage> + </properties> <children> #include <include/nat-interface.xml.i> <node name="translation"> @@ -110,6 +113,38 @@ </tagNode> </children> </node> + <node name="static"> + <properties> + <help>Static NAT (one-to-one)</help> + </properties> + <children> + <tagNode name="rule"> + <properties> + <help>Rule number for NAT</help> + </properties> + <children> + #include <include/generic-description.xml.i> + <node name="destination"> + <properties> + <help>NAT destination parameters</help> + </properties> + <children> + #include <include/ipv4-address-prefix.xml.i> + </children> + </node> + #include <include/inbound-interface.xml.i> + <node name="translation"> + <properties> + <help>Translation address or prefix</help> + </properties> + <children> + #include <include/ipv4-address-prefix.xml.i> + </children> + </node> + </children> + </tagNode> + </children> + </node> </children> </node> </interfaceDefinition> |