<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 24, 2017 at 4:30 AM, Simos Xenitellis <span dir="ltr"><<a href="mailto:simos.lists@googlemail.com" target="_blank">simos.lists@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On Sat, Apr 22, 2017 at 6:52 PM, Dan Kegel <<a href="mailto:dank@kegel.com">dank@kegel.com</a>> wrote:<br>
> TL;dr:<br>
><br>
> For Ubuntu 16.04 users who have lxd-2.0.9 from xenial-updates,<br>
> what is the fast path towards simple lxd container-on-the-lan happiness?<br>
> (Extra credit: allow ssh between the host and the guest, also part of<br>
> Things Just Working.)<br>
><br>
<br>
</span>To SSH from the host to the guest, you can run the command<br>
<br>
cat ~/.ssh/id_rsa.pub | lxc exec mycontainer -- sudo --login --user<br>
ubuntu tee /home/ubuntu/.ssh/authorized_<wbr>keys<br>
<br></blockquote><div><br></div><div>I believe Dan was refering to macvlan, a way for the containers to be in the same L2 network as host's eth0 without having to create a bridge. IIRC the downside of this approach, is by default the container can communicate with all ips on that network EXCEPT for the host (the host also needs a macvlan interface).</div><div><br></div><div>Personally, I think:</div><div>- most users will be happy with default NAT setup</div><div>- port forwarding is the easy way to allow access to specific container port from LAN (similar to what docker does): <a href="https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-network">https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-network</a></div><div>- bridging host's eth0 is the way to go if you need 'real' LAN IP for the container: <a href="https://help.ubuntu.com/lts/serverguide/network-configuration.html#bridging">https://help.ubuntu.com/lts/serverguide/network-configuration.html#bridging</a></div><div>- xen had a good idea: automatically create the bridge (xenbr0) and 'magically' move eth0 name from the 'real' physical interface to veth, to make it easier for 'networking newbies'. I don't like the implementation though, and prefer to create my own bridge (which is the only way to get vlan and bonding support). </div><div><br></div><div>-- </div><div>Fajar</div></div></div></div>