Page MenuHomeVyOS Platform

Show nat destination rules shows ip address instead of interface 'any'
Closed, ResolvedPublicBUG

Description

Expected any instead of ip address 203.0.113.5
To reproduce:

set nat destination rule 100 description 'Regular destination NAT from external'
set nat destination rule 100 destination port '3389'
set nat destination rule 100 inbound-interface 'eth0'
set nat destination rule 100 protocol 'tcp'
set nat destination rule 100 translation address '192.0.2.40'
set nat destination rule 100 translation port '80'
set nat destination rule 380 destination address '203.0.113.5'
set nat destination rule 380 destination port 'https'
set nat destination rule 380 inbound-interface 'any'
set nat destination rule 380 protocol 'tcp'
set nat destination rule 380 translation address '192.0.2.5'
set nat destination rule 380 translation port '8443'

Show nat rules (incorrect inbound interface for the rule 380):

vyos@r11-roll:~$ show nat destination rules 
Rule       Destination                                        Translation                                        Inbound Interface
----       -----------                                        -----------                                        -----------------
100        port 3389                                          192.0.2.40 port 80                                 eth0      
380        port 443                                           192.0.2.5 port 8443                                203.0.113.5

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.4-rolling-202112210318
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav renamed this task from Show nat rules shows ip address instead of interface 'any' to Show nat destination rules shows ip address instead of interface 'any'.Jul 29 2022, 3:00 PM
Viacheslav changed the task status from Open to In progress.Jul 30 2022, 8:52 AM
Viacheslav claimed this task.

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

vyos@r14:~$ show nat destination rules 
Rule    Source     Destination    Proto    In-Int    Translation
------  ---------  -------------  -------  --------  -------------
100     0.0.0.0/0  0.0.0.0/0      TCP      eth0      192.0.2.40
        sport any  dport 3389                        port 80
380     0.0.0.0/0  203.0.113.5    TCP      any       192.0.2.5
        sport any  dport 443                         port 8443
vyos@r14:~$
Viacheslav changed the task status from In progress to Needs testing.Jul 30 2022, 10:25 AM
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.