Completion:
vyos@vyos# set nat source rule 10 destination port Possible completions: <1-65535> Numeric IP port start-end Numbered port range (e.g. 1001-1005) None Multiple destination ports can be specified as a comma-separated list. The whole list can also be negated using '!'. For example: '!22,telnet,http,123,1001-1005'
Using the example in completion results in an exception:
Traceback (most recent call last): File "/usr/libexec/vyos/conf_mode/nat.py", line 206, in <module> generate(c) File "/usr/libexec/vyos/conf_mode/nat.py", line 188, in generate if os.path.exists(nftables_ct_file): NameError: name 'nftables_ct_file' is not defined noteworthy: cmd 'nft -c -f /tmp/vyos-nat-rules.nft' returned (out): returned (err): /tmp/vyos-nat-rules.nft:20:72-72: Error: syntax error, unexpected ! add rule ip nat POSTROUTING oifname "eth0" ip protocol tcp tcp dport { !22,telnet,http,123,1001-1005 } counter snat to 172.16.10.1 comment "SRC-NAT-10"