[Lxc-users] Networking between host and container

Marko Anastasov marko.anastasov at gmail.com
Fri Dec 28 12:22:25 UTC 2012


On Dec 28, 2012, at 13:07 , Rob van der Hoeven <robvanderhoeven at ziggo.nl> wrote:

> 
>> What is the best way to broadcast container's hostname to host? 
>> I want to be able to ssh from host into the container using its 
>> hostname as handle, instead of an IP address.
>> 
>> I'm using the default template in Ubuntu 12.04. 
>> I have made a container template that I want to reuse.
> 
> My setup uses the container name as its handle.
> If I create a container like this: 
> 
> cd /var/lib/lxc
> mkdir test
> /usr/lib/lxc/templates/lxc-debian-box -n test -p /var/lib/lxc/test
> 
> I can access it with:
> 
> ssh root at test.freedom.box
> 
> Maybe this is what you want?
> My setup uses dnsmasq to do some DHCP/DNS magic. 
> Wrote an article about my setup:
> 
> http://freedomboxblog.nl/installing-lxc-dhcp-and-dns-on-my-freedombox/
> 

Hi Rob,

Yes that's exactly the setup I want. If nothing I'll try to extrapolate what you're doing on Debian with what's available on Ubuntu.

Thanks for sharing,
Marko



More information about the lxc-users mailing list