Page MenuHomeVyOS Platform

nat66: KeyError: 'group' on config removal
Closed, ResolvedPublicBUG

Description

set interfaces dummy dum0 description 'Dummy for incoming IPv6 traffic'
set interfaces dummy dum0 mtu 1500
set interfaces dummy dum0 address fdb4:5ed0:c509::1/48

set nat66 destination rule 8 description 'Public fixed IPv6'
set nat66 destination rule 8 inbound-interface name 'pppoe0'
set nat66 destination rule 8 destination address xxxx:xxxx:41:c000::1
set nat66 destination rule 8 translation address fdb4:5ed0:c509::1

When I try to do

delete nat66 destination rule 8 inbound-interface name 'pppoe0'
commit

I get

[ nat66 ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 156, in run_script
    script.generate(c)
  File "/usr/libexec/vyos/conf_mode/nat66.py", line 133, in generate
    render(nftables_nat66_config, 'firewall/nftables-nat66.j2', nat)
  File "/usr/lib/python3/dist-packages/vyos/template.py", line 174, in render
    rendered = render_to_string(template, content, formater, location)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/template.py", line 143, in render_to_string
    rendered = template.render(content)
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/usr/share/vyos/templates/firewall/nftables-nat66.j2", line 18, in top-level template code
    {{ config | nat_rule(rule, 'destination', ipv6=True) }}
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/template.py", line 716, in nat_rule
    return parse_nat_rule(rule_conf, rule_id, nat_type, ipv6)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/nat.py", line 41, in parse_nat_rule
    iiface = rule_conf['inbound_interface']['group']
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'group'

Details

Version
rolling-20260519
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)
Forum thread
https://forum.vyos.io/t/crash-on-commit-after-removing-nat-rule

Event Timeline

c-po changed the task status from Open to In progress.
c-po claimed this task.
c-po triaged this task as Normal priority.
c-po updated the task description. (Show Details)
c-po changed Forum thread from https://forum.vyos.io/t/crash-on-commit-after-removing-nat-rule/17482nat66: to https://forum.vyos.io/t/crash-on-commit-after-removing-nat-rule.May 28 2026, 8:01 PM