Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

How to configure a public IP address on LXD guest

$
0
0
Hi,

I'm struggling to attach a public IP address to a LXD guest system. Does anyone has experience how to set this up properly? I'm running Ubuntu 16.04 with LXD version 2.0.8-0ubuntu1~ubuntu16.04.2 500 and also installed bridge-utils to create bridges.

I've succesfully created a bridge on the host which is properly routed/reachable over te internet.

This is the config on my host:

auto eth0:1
iface eth0:1 inet manual


auto br2
iface br2 inet static
address x.x.x.x
netmask 255.255.255.0
network x.x.x.0
broadcast x.x.x.255
gateway x.x.x.254
bridge_ports eth0:1
bridge_ports wan_phy #I've also tried this settings without any results
bridge_stp off
bridge_fd 0
bridge_maxwait 0

After that, I've created a profile that connects the guest nic to the host (I've tried several nictypes: bridged, macvlan, physical and p2p):

config:
raw.lxc: lxc.aa_allow_incomplete=1
description: ""
devices:
eth0:
name: eth0
nictype: macvlan
parent: br2
type: nic
eth1:
name: eth1
nictype: bridged
parent: br0
type: nic

On the guest:

auto eth1
iface eth1 inet static
address 192.x.x.x
netmask 255.255.255.0
network 192.x.x.0
broadcast 192.x.x.255


auto eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.255.0
network x.x.x.0
broadcast x.x.x.255
gateway x.x.x.254

With some nictype configurations I'm able to ping the public IP on the host. But The public IP of the guest is unreachable over te internet.

Hope anybody has a good suggestion how to publish a public IP properly on a VM?

Many thanks in advance!

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>