Hi
I have been trying to find a proper way to access the fresh Ubuntu container I have setup here with no real good luck. Along the process I lost connections to my server, created bunch of useless interfaces and wasted many hourrs with no proper way.
Many tutorials talks about commands like “lxc profile” I have no lxc profile. I am on Debian Testing so I only have commands that start with lxc-
, and some other recommend comamnds did not even existed on my system, even from the Debian Wiki.
I am llooking for an upto date info on this issue that works on Debain Testing with Lxc
The Ubuntu container sets its own ip as 192.168.5.231/24
Container
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
Host
cat /var/lib/lxc/ubuntu/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template:
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.arch = linux64
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.rootfs.path = dir:/var/lib/lxc/ubuntu/rootfs
lxc.uts.name = ubuntu
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
ip addr show
lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:00:00:00 brd ff:ff:ff:ff:ff:ff
inet 192.168.5.210/24 scope global lxcbr0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe00:0/64 scope link
valid_lft forever preferred_lft forever
cat /etc/lxc/default.conf
lxc.net.0.type = empty
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
lxc.net.0.type = veth
#lxc.net.0.link = virbr0
lxc.net.0.link = lxcbr0
#lxc.net.0.link = br7
lxc.net.0.flags = up
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
sysctl conf
net.ipv4.ip_forward=1
Thanks