Skip to content

vr_nat4

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

NAT4

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

Context Configuration Attributes

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> ...)
Clone this wiki locally