From f0d0a572af9663a3dbbdbf5bbe9631a30235637f Mon Sep 17 00:00:00 2001 From: jack9603301 Date: Sat, 13 Mar 2021 15:03:53 +0800 Subject: nat: nat66: T2518: Support operation mode command --- op-mode-definitions/nat.xml.in | 4 +- op-mode-definitions/nat66.xml.in | 98 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 op-mode-definitions/nat66.xml.in (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/nat.xml.in b/op-mode-definitions/nat.xml.in index 4b09816f9..949400eba 100644 --- a/op-mode-definitions/nat.xml.in +++ b/op-mode-definitions/nat.xml.in @@ -16,7 +16,7 @@ Show configured source NAT rules - echo To be migrated to Python - Phabricator T2459 + ${vyos_op_scripts_dir}/show_nat_rules.py --source @@ -58,7 +58,7 @@ Show configured destination NAT rules - echo To be migrated to Python - Phabricator T2459 + ${vyos_op_scripts_dir}/show_nat_rules.py --destination diff --git a/op-mode-definitions/nat66.xml.in b/op-mode-definitions/nat66.xml.in new file mode 100644 index 000000000..c57c7c8b3 --- /dev/null +++ b/op-mode-definitions/nat66.xml.in @@ -0,0 +1,98 @@ + + + + + + + Show Network Address Translation (NAT) information + + + + + Show source Network Address Translation (NAT) information + + + + + Show configured source NAT rules + + ${vyos_op_scripts_dir}/show_nat66_rules.py --source + + + + Show statistics for configured source NAT rules + + ${vyos_op_scripts_dir}/show_nat66_statistics.py --source + + + + Show active source NAT translations + + + + + Show active source NAT translations for an IP address + + <h:h:h:h:h:h:h:h> + + + ${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose --ipaddr="$6" + + + + Show active source NAT translations detail + + ${vyos_op_scripts_dir}/show_nat66_translations.py --type=source --verbose + + + ${vyos_op_scripts_dir}/show_nat66_translations.py --type=source + + + + + + Show destination Network Address Translation (NAT) information + + + + + Show configured destination NAT rules + + ${vyos_op_scripts_dir}/show_nat66_rules.py --destination + + + + Show statistics for configured destination NAT rules + + ${vyos_op_scripts_dir}/show_nat66_statistics.py --destination + + + + Show active destination NAT translations + + + + + Show active NAT destination translations for an IP address + + <h:h:h:h:h:h:h:h> + + + ${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose --ipaddr="$6" + + + + Show active destination NAT translations detail + + ${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination --verbose + + + ${vyos_op_scripts_dir}/show_nat66_translations.py --type=destination + + + + + + + + -- cgit v1.2.3