Add the ability to show port allocation per external or internal address
Currently, we can check only all allocations without filtering; with huge entries, it is necessary to filter it by specific external/internal IP address
Current:
vyos@r4:~$ show nat cgnat allocation Internal IP External IP Port range ------------- ------------- ------------ 100.64.0.0 192.0.2.1 40000-44999 100.64.0.1 192.0.2.1 45000-49999 100.64.0.2 192.0.2.1 50000-54999 100.64.0.3 192.0.2.1 55000-59999 100.64.0.4 192.0.2.2 40000-44999 100.64.0.5 192.0.2.2 45000-49999 100.64.0.6 192.0.2.2 50000-54999 100.64.0.7 192.0.2.2 55000-59999 100.64.222.10 203.0.113.55 2000-3999 100.64.222.11 203.0.113.55 4000-5999 100.64.222.12 203.0.113.55 6000-7999 vyos@r4:~$
Proposed extended options:
vyos@r4:~$ show nat cgnat allocation external-address 192.0.2.2 Internal IP External IP Port range ------------- ------------- ------------ 100.64.0.4 192.0.2.2 40000-44999 100.64.0.5 192.0.2.2 45000-49999 100.64.0.6 192.0.2.2 50000-54999 100.64.0.7 192.0.2.2 55000-59999 vyos@r4:~$ vyos@r4:~$ show nat cgnat allocation internal-address 100.64.0.3 Internal IP External IP Port range ------------- ------------- ------------ 100.64.0.3 192.0.2.1 55000-59999 vyos@r4:~$