From f233a9e4073f3c5257923962a96af5833734e41e Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 14 May 2020 18:37:39 +0200 Subject: nat: T2198: migrate "show nat" commands to XML and Python - "show nat source|destination statistics" is now implemented in Python - "show nat source|destination rules" needs a new implementation, see T2459 - "show nat source|destination translations" has been copied over from the old repo and is here until it is rewritten, this was not possible for "rules" as there would have been too much dependencies. This one only requires libxml-simple-perl --- op-mode-definitions/nat.xml | 98 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 op-mode-definitions/nat.xml (limited to 'op-mode-definitions') diff --git a/op-mode-definitions/nat.xml b/op-mode-definitions/nat.xml new file mode 100644 index 000000000..ffaa2cba3 --- /dev/null +++ b/op-mode-definitions/nat.xml @@ -0,0 +1,98 @@ + + + + + + + Show Network Address Translation (NAT) information + + + + + Show source Network Address Translation (NAT) information + + + + + Show configured source NAT rules + + echo To be migrated to Python - https://phabricator.vyos.net/T2459 + + + + Show statistics for configured source NAT rules + + ${vyos_op_scripts_dir}/show_nat_statistics.py --source + + + + Show active source NAT translations + + + + + Show active source NAT translations for an IP address + + <x.x.x.x> + + + ${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=source --verbose --ipaddr="$6" + + + + Show active source NAT translations detail + + ${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=source --verbose + + + ${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=source + + + + + + Show destination Network Address Translation (NAT) information + + + + + Show configured destination NAT rules + + echo To be migrated to Python - https://phabricator.vyos.net/T2459 + + + + Show statistics for configured destination NAT rules + + ${vyos_op_scripts_dir}/show_nat_statistics.py --destination + + + + Show active destination NAT translations + + + + + Show active NAT destination translations for an IP address + + <x.x.x.x> + + + ${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=destination --verbose --ipaddr="$6" + + + + Show active destination NAT translations detail + + ${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=destination --verbose + + + ${vyos_op_scripts_dir}/to_be_migrated/vyatta-nat-translations.pl --type=destination + + + + + + + + -- cgit v1.2.3