i follow the document and successful set up a bridge network, but i don’t know how to set up a NAT network. there is only a few topic about NAT network and the document is confusing for me. so i want to follow a NAT network example so i can follow it and solve this problem.
OpenNebula doesn’t perform NATing, you have to do so on your own while setting up the bridge. OpenNebula will only create the bridge automatically if it doesn’t exist when a VM requests a bridge port.
I can share my existing setup reference as a example
Host OS: UBUNTU 22.04
Opennebula Version: 6.6
KVM Host Setup (Follow Official Documents: KVM Node Deployment — OpenNebula 6.6.0 documentation
sudo su -c “apt -y install dnsmasq dnsmasq-base”
systemctl stop dnsmasq && systemctl status dnsmasq --no-pager
Kind=bridge’ > /etc/systemd/network/cloudbr0-nic.netdev
addresses: [ 172.16.0.1/24 ]
interfaces: [ nat-br0-nic ]’ > /etc/netplan/cloudbr0.yaml
sudo netplan --debug generate && sudo systemctl restart systemd-networkd
bind-interfaces’ > /etc/dnsmasq.conf
systemctl start dnsmasq && systemctl enable dnsmasq && systemctl status dnsmasq --no-pager
iptables -t nat -A POSTROUTING -s 172.16.0.0/24 ! -d 172.16.0.0/24 -j MASQUERADE
iptables -t nat -L -n -v
cat > vnet0.txt <<EOF
BRIDGE = “nat-br0”
BRIDGE_TYPE = “linux”
DESCRIPTION = “NAT Default Network”
DNS = “172.16.0.1 184.108.40.206 220.127.116.11”
GATEWAY = “172.16.0.1”
NETWORK_ADDRESS = “172.16.0.0”
NETWORK_MASK = “255.255.255.0”
OUTER_VLAN_ID = “”
PHYDEV = “”
SECURITY_GROUPS = “0”
VLAN_ID = “”
VN_MAD = “fw”
TYPE = “IP4”,
IP = “172.16.0.2”,
SIZE = “250”
Hope this will help, Good Luck.
While setting Up NAT in physical resources it works via vmware or vcenter might work.
NAT Network Setup is KVM node or vm intance.
u can share with me?