Page MenuHomeVyOS Platform

Dynamic SNAT on VPP with src/dst matching criteria on rules NAT.
Open, NormalPublicFEATURE REQUEST

Description

Feature Description

Add an option on VPP NAT that allows performing Dynamic SNAT for multiple IPs that belong to the local device:

## current VPP options
set vpp nat nat44 address-pool translation address" VyOS_IP_A" --> IP belongs to Vyos Interface A
set vpp nat nat44 address-pool translation address "VyOS_IP_B" --> IP belongs to Vyos interface B
set vpp nat nat44 interfaces outside A  --> WAN2
set vpp nat nat44 interfaces outside B  --> WAN1
set vpp nat nat44 interfaces inside C  --> LAN
set vpp setting interface A
set vpp setting interface B
set vpp setting interface C

With this configuration, the SNAT from the C LAN to the outside (Internet) its unknown what IP will use to translate the source address could be A or B and there is no option to select one or another. A common NAT application is to use different Dynamic NAT translation according to specific source or destination criteria on the NAT rule, for example:

set nat source rule 2 destination address '0.0.0.0/0'
set nat source rule 2 outbound-interface name 'eth0'  -->   WAN interface
set nat source rule 2 source address '192.168.1.0/24'   -->   LAN subnet
set nat source rule 2 translation address 'masquerade'

set nat source rule 1 destination address 'Remote_subnet'
set nat source rule 1 outbound-interface name 'eth1'  -->   WAN2 interface
set nat source rule 1 source address '192.168.1.0/24'   -->   LAN subnet
set nat source rule 1 translation address 'masquerade'

As we can see in this example, the same subnet will use eth0 (WAN interface) for the Internet, and eth1 for a specific Remote_subnet as a destination. Here we are using two IPs to translate the source address (as we have in the VPP config) but it will apply one or another depending on the destination, in this case. On VPP there is no option to allow this.

Use case

Dynamic NAT rules with source and destination criterias are very common for network deployments with multiple ISPs and internal NATting communication.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Related Objects

StatusSubtypeAssignedTask
OpenFEATURE REQUESTNone
OpenFEATURE REQUESTNone