summaryrefslogtreecommitdiff
path: root/op-mode-definitions/nat.xml.in
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-05-21 08:06:35 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-05-21 08:06:35 +0000
commitc554c483817bfc6ef4f0175298d23355696f8665 (patch)
tree681635b281f5a255af7c51b2c32a708160724779 /op-mode-definitions/nat.xml.in
parent7b2d9e1f68b76815ff6a4eaa3c668dbdbe7b236d (diff)
downloadvyos-1x-c554c483817bfc6ef4f0175298d23355696f8665.tar.gz
vyos-1x-c554c483817bfc6ef4f0175298d23355696f8665.zip
T6366: CGNAT add ability to get external and internal allocations
Add the ability to show port allocation per external or internal address With huge entries, it is necessary to filter it by specific external/internal IP address
Diffstat (limited to 'op-mode-definitions/nat.xml.in')
-rw-r--r--op-mode-definitions/nat.xml.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in
index 6398c0e07..13e7fd81d 100644
--- a/op-mode-definitions/nat.xml.in
+++ b/op-mode-definitions/nat.xml.in
@@ -16,6 +16,26 @@
<properties>
<help>Show allocated CGNAT parameters</help>
</properties>
+ <children>
+ <tagNode name="external-address">
+ <properties>
+ <help>Show CGNAT allocations for an external IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation --external-address "$6"</command>
+ </tagNode>
+ <tagNode name="internal-address">
+ <properties>
+ <help>Show CGNAT allocations for an internal IP address</help>
+ <completionHelp>
+ <list>&lt;x.x.x.x&gt;</list>
+ </completionHelp>
+ </properties>
+ <command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation --internal-address "$6"</command>
+ </tagNode>
+ </children>
<command>sudo ${vyos_op_scripts_dir}/cgnat.py show_allocation</command>
</node>
</children>