summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorNataliia S. <81954790+natali-rs1985@users.noreply.github.com>2025-04-01 17:30:12 +0300
committerGitHub <noreply@github.com>2025-04-01 15:30:12 +0100
commit07a3b0f5ae87a2ab400390c9fa0ca632d7815e15 (patch)
treedd6c549c9694e14d31c4c47f0649f187d36863b3 /interface-definitions
parentaf6751ecdf44bde0c6dfb397e5ad128561f93112 (diff)
downloadvyos-1x-07a3b0f5ae87a2ab400390c9fa0ca632d7815e15.tar.gz
vyos-1x-07a3b0f5ae87a2ab400390c9fa0ca632d7815e15.zip
T7283: VPP add static NAT support (#24)
* T7283: VPP add static NAT support Add static mapping NAT implementation ``` set vpp nat44 static rule 10 outbound-interface 'eth0' set vpp nat44 static rule 10 inbound-interface 'eth1' set vpp nat44 static rule 10 destination address 192.168.122.10 # optional, if not set outbound interface ip address is used set vpp nat44 static rule 10 destination port 6545 # optional set vpp nat44 static rule 10 protocol tcp|udp|icmp|all # optional, defaults to "all" set vpp nat44 static rule 10 translation address 100.64.0.10 set vpp nat44 static rule 10 translation port 64010 # optional ``` * Improve help strings (Daniil Baturin) --------- Co-authored-by: Daniil Baturin <daniil@baturin.org>
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/vpp.xml.in105
1 files changed, 105 insertions, 0 deletions
diff --git a/interface-definitions/vpp.xml.in b/interface-definitions/vpp.xml.in
index 94d87a8dd..66a38f546 100644
--- a/interface-definitions/vpp.xml.in
+++ b/interface-definitions/vpp.xml.in
@@ -905,6 +905,111 @@
</node>
</children>
</node>
+ <node name="static" owner="${vyos_conf_scripts_dir}/vpp_nat_static.py">
+ <properties>
+ <help>Static NAT settings</help>
+ <priority>321</priority>
+ </properties>
+ <children>
+ <tagNode name="rule">
+ <properties>
+ <help>Rule number for NAT</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>Number of NAT rule</description>
+ </valueHelp>
+ </properties>
+ <children>
+ <node name="destination">
+ <properties>
+ <help>NAT external parameters</help>
+ </properties>
+ <children>
+ <leafNode name="address">
+ <properties>
+ <help>IP address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/port-number.xml.i>
+ </children>
+ </node>
+ <leafNode name="protocol">
+ <properties>
+ <help>Protocol to NAT</help>
+ <completionHelp>
+ <list>tcp udp icmp all</list>
+ </completionHelp>
+ <valueHelp>
+ <format>all</format>
+ <description>All protocols (TCP, UDP, and ICMP)</description>
+ </valueHelp>
+ <valueHelp>
+ <format>icmp</format>
+ <description>Internet control message protocol</description>
+ </valueHelp>
+ <valueHelp>
+ <format>tcp</format>
+ <description>Transmission control protocol</description>
+ </valueHelp>
+ <valueHelp>
+ <format>udp</format>
+ <description>user datagram protocol</description>
+ </valueHelp>
+ <constraint>
+ <regex>(tcp|udp|icmp|all)</regex>
+ </constraint>
+ </properties>
+ <defaultValue>all</defaultValue>
+ </leafNode>
+ <leafNode name="outbound-interface">
+ <properties>
+ <help>Outbound interface of NAT traffic</help>
+ <completionHelp>
+ <list>any</list>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ <leafNode name="inbound-interface">
+ <properties>
+ <help>Inbound interface of NAT traffic</help>
+ <completionHelp>
+ <list>any</list>
+ <script>${vyos_completion_dir}/list_interfaces</script>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ <node name="translation">
+ <properties>
+ <help>NAT internal parameters</help>
+ </properties>
+ <children>
+ <leafNode name="address">
+ <properties>
+ <help>IP address</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/port-number.xml.i>
+ </children>
+ </node>
+ </children>
+ </tagNode>
+ </children>
+ </node>
</children>
</node>
<tagNode name="kernel-interfaces" owner="${vyos_conf_scripts_dir}/vpp_kernel-interfaces.py">