Page MenuHomeVyOS Platform

show nat source translation - Errors out
Closed, ResolvedPublicBUG

Description

While performing a NAT masquerade type of configuration, the show nat source translation command is erring out.
This doesn't occur all the time. When I first started the router things reported just fine, however it now shows:

vyos@edgece:/var/log$ show nat source translations`
 Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/show_nat_translations.py", line 200, in <module>
Pre-NAT              Post-NAT             Prot  Timeout
    main()
  File "/usr/libexec/vyos/op_mode/show_nat_translations.py", line 196, in main
    process(run(command(arg.type, arg.proto, arg.ipaddr)), arg.stats, arg.proto, arg.pipe, arg.verbose, arg.type)
  File "/usr/libexec/vyos/op_mode/show_nat_translations.py", line 106, in process
    rule_type = rule.get('type', '')
AttributeError: 'str' object has no attribute 'get'

Traffic behind this router is normal UDP/TCP traffic, and a host doing Strongswan through the router and being NAT'd. However, it should be encapsulated in NAT-T's standard port.

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202008250118
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

PR https://github.com/vyos/vyos-1x/pull/656

vyos@r4-roll:~$ show nat source translations 
Pre-NAT              Post-NAT             Prot  Timeout  
10.0.0.2             192.168.122.14       icmp  24       
10.0.0.2             192.168.122.14       icmp  23       
10.0.0.2             192.168.122.14       icmp  25       
10.0.0.2:123         192.168.122.14:123   udp   19       
vyos@r4-roll:~$
erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 1:12 PM
erkin removed a subscriber: Active contributors.