The following Perl script needs a Python migration
https://github.com/vyos/vyatta-nat/blob/current/scripts/vyatta-show-nat-rules.pl
and should be placed here: https://github.com/vyos/vyos-1x/tree/current/src/op_mode
The output is as follows:
[email protected]:~$ show nat source rules Disabled rules are not shown Codes: X - exclude rule, M - masquerade rule rule intf translation ---- ---- ----------- M100 pppoe0 saddr 172.16.32.0/19 to xx.xx.192.111 proto-all sport ANY M200 pppoe0 saddr 172.16.100.0/24 to xx.xx.192.111 proto-all sport ANY M300 pppoe0 saddr 172.31.0.0/24 to xx.xx.192.111 proto-all sport ANY M400 pppoe0 saddr 172.18.201.0/21 to xx.xx.192.111 proto-all sport ANY
[email protected]:~$ show nat destination rules Disabled rules are not shown Codes: X - exclude rule rule intf translation ---- ---- ----------- 100 pppoe0 daddr ANY to 172.16.36.10 proto-tcp dport 80,443 Desc: HTTP(S) 1000 pppoe0 daddr ANY to 172.16.33.40 proto-tcp dport 3389 Desc: RDP to fooo.vyos.net