Skip to content

vr_nat4

Ruben S. Montero edited this page Jan 9, 2024 · 8 revisions

NAT4

Parameter Default Description
ONEAPP_VNF_NAT4_ENABLED NO Enable/Disable NAT feature (YES/NO)
ONEAPP_VNF_NAT4_INTERFACES_OUT no NICs Mandatory: Outgoing NICs for NAT (<[!]ethX> ...)

This feature enables MASQUERADE in the POSTROUTING chain in iptables.

For example, when three NICs (eth0, eth1, eth2) are attached to a VR:

CONTEXT = [
  ...
  ONEAPP_VNF_NAT4_ENABLED        = "YES",
  ONEAPP_VNF_NAT4_INTERFACES_OUT = "eth0", # same as "!eth1 !eth2"
  ...
]

Gives:

$ iptables -t nat -vnL NAT4
Chain NAT4 (1 references)
 pkts bytes target     prot opt in     out     source               destination
12345 6789K MASQUERADE  0    --  *      eth0    0.0.0.0/0            0.0.0.0/0
Clone this wiki locally