~/.config/lxc/default.conf
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
If it is desirable for the container to be publicly accessible, there are a few ways to do it:
- use iptables to forward host ports to the container
- bridge the host's network interfaces
- ask LXC to use macvlan for the container's NIC. Note that this has limitations and depending on configuration may not allow the container to talk to the host itself. Therefore the other two options are preferred and more commonly used.
Read more - https://wiki.debian.org/LXC/SimpleBridge