-
Notifications
You must be signed in to change notification settings - Fork 16
vr_nat4
Michal Opala edited this page Feb 6, 2024
·
8 revisions
Use this mode when the VMs behind the Virtual Router have private IP addresses, and your goal is to enable their internet access through the Virtual Router. This feature enables MASQUERADE in the POSTROUTING iptables chain.
The following figure depicts the basic LAN topology assumed by the module:
public Network
┌───────────────────────
┌──┴─┐ (*) NAT
┌──┤eth0├──┐
│ └────┘ │
│ Virtual │
│ Router │
│ ┌────┐ │
└──┤eth1├──┘
└─┬──┘
│ private network (e.g. 192.168.0.0/24)
└────┬───────────┬────────────┬──────────
┌──┴──┐ ┌──┴──┐ ┌──┴──┐
│ VM1 │ │ VM2 │ │ VM3 │
└─────┘ └─────┘ └─────┘
The following attributes control the basic configuration for NAT'ing:
-
ONEAPP_VNF_NAT4_ENABLED
to activate the module -
ONEAPP_VNF_NAT4_INTERFACES_OUT
defines the public interface
For example, for the example above simply add:
CONTEXT = [
...
ONEAPP_VNF_NAT4_ENABLED = "YES",
ONEAPP_VNF_NAT4_INTERFACES_OUT = "eth0",
...
]
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
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> ... ) |
- OpenNebula Apps Overview
- OS Appliances Update Policy
- OneApps Quick Intro
- Build Instructions
- Linux Contextualization Packages
- Windows Contextualization Packages
- OneKE (OpenNebula Kubernetes Edition)
- Virtual Router
- Release Notes
- Overview
- Quick Start
- OpenRC Services
- Virtual Router Modules
- Glossary
- WordPress
- Harbor Container Registry
- MinIO
- Development