[lxc-users] Newbie

Alvaro Miranda Aguilera kikitux at gmail.com
Tue Jun 24 21:48:17 UTC 2014


hello,

you need to enable ip forwarding in the kernel of the host, and the
containers will have access to the network.

something like this:

sysctl -w net.ipv4.ip_forward=1
sed -i -e 's/net.ipv4.ip_forward\s=\s0$/net.ipv4.ip_forward = 1/'
/etc/sysctl.conf


the containers will be isolated in his own network, where the host should
be able to ping/access the containers, but not from the network.

if you want from outside of the host access the conainers, you can publish
the ports over the host (reverse proxy, load balancer, reverse
nat/iptables) or you can create a bridge in the host, move the physical
interface to the bridge, and make the lxc containers to use that bridge, in
that way the containers will be on the network.

hope this helps


On Wed, Jun 25, 2014 at 2:54 AM, Raymond Jender <rayj00 at yahoo.com> wrote:

>
> Hi.  I'm brand new at playing with LXC and containers.
> My host is Ubuntu 12.04.04.
>
> So, when I created my first container, I used whatever the
> defaults are.  So I created a container that has the same
> OS as the host.  Great!
>
> However I am having networking issues.  I thought I read that
> LXC uses it's own DHCP?  The host is 192.168.1.131.
> Container is 10.0.3.177. And I am using a Wireless WiFi connection.
> (I am thinking I should go back to wired?)
>
> The Host can ping the container and the container can
> ping the host.  However that's as far as the container can go.
> It cannot ping any other device on the 192.168.1.x subnet?
> What is weird is I did an "apt-get install nginx" in the
> container and it worked?
>
> So that's one issue.
>
> The other nagging issue is mounting a USB thumb drive.
> It works fine on the host but in the container, it complains about
> read write, or something similar.  (Sorry,  at work right now).
> I thought maybe there's a "How To" for setting this up?
>
> It seems that there isn't much good documentation around for
> LXC and containers?
>
> Thanks for your help.
>
> Ray
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140625/587cd236/attachment.html>


More information about the lxc-users mailing list