Page MenuHomeVyOS Platform

Unable to delete destination NAT rule
Closed, ResolvedPublicBUG



I tried to delete a destination NAT rule and got the following error. I was later able to delete the rule by deleting allt destination nat rules with the command: "delete nat destination"
Thankfully I only had the one destination NAT rule. :)

vyos@vyos# delete nat destination rule 100
vyos@vyos# compare
[edit nat destination]
-rule 100 {
-    description "wg to local lan nat"
-    destination {
-        address
-    }
-    inbound-interface wg01
-    translation {
-        address
-    }
vyos@vyos# commit
[ nat ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
- Consult the forum to see how to handle this issue
- Join our community on slack where our users exchange help and advice

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report Time:      2021-01-08 16:22:30
Image Version:    VyOS 1.3-rolling-202101071430
Release Train:    equuleus

Built by:
Built on:         Thu 07 Jan 2021 14:30 UTC
Build UUID:       710ade27-8981-49da-ac27-47acc9b4f413
Build Commit ID:  432f3f96927a54

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    d05ef330-35a4-4136-9b5d-d4e01ae22ac0

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/", line 198, in <module>
    c = get_config()
  File "/usr/libexec/vyos/conf_mode/", line 91, in get_config
    for rule in nat[direction]['rule']:
KeyError: 'rule'

[[nat]] failed
Commit failed


Difficulty level
Easy (less than an hour)
VyOS 1.3-rolling-202101071430
Why the issue appeared?
Design mistake
Is it a breaking change?
Stricter validation

Event Timeline

c-po changed the task status from Open to In progress.Mon, Jan 11, 6:26 PM
c-po claimed this task.
c-po triaged this task as Normal priority.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.

Will be fixed in rolling releases starting 20210112. Thanks for reporting.