<div dir="ltr">hello,<div><br></div><div>you need to enable ip forwarding in the kernel of the host, and the containers will have access to the network.</div><div><br></div><div>something like this:</div><div><br></div><div>
<pre style="overflow:auto;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);line-height:18px"><div class="" id="LC46" style="padding-left:10px;height:18px">
sysctl -w net.ipv4.ip_forward<span class="" style="font-weight:bold">=</span>1</div><div class="" id="LC47" style="padding-left:10px;height:18px">sed -i -e <span class="" style="color:rgb(221,17,68)">'s/net.ipv4.ip_forward\s=\s0$/net.ipv4.ip_forward = 1/'</span> /etc/sysctl.conf</div>
<div class="" id="LC47" style="padding-left:10px;height:18px"><br></div></pre></div><div><br></div><div>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.</div>

<div><br></div><div>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.</div>

<div><br></div><div>hope this helps</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 25, 2014 at 2:54 AM, Raymond Jender <span dir="ltr"><<a href="mailto:rayj00@yahoo.com" target="_blank">rayj00@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size:10pt">
<div><br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">Hi.  I'm brand new at playing with LXC and containers.</div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">My host is Ubuntu 12.04.04.</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
<br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">So, when I created my first container, I used whatever the <br>
</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">defaults are.  So I created a container that has the same</div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">OS as the host.  Great!</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
<br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">However I am having networking issues.  I thought I read that</div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">LXC uses it's own DHCP?  The host is 192.168.1.131.  <br>
</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">Container is 10.0.3.177. And I am using a Wireless WiFi connection.</div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">(I am thinking I should go back to wired?)<br>
</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
The Host can ping the container and the container can</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
ping the host.  However that's as far as the container can go.</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
It cannot ping any other device on the 192.168.1.x subnet?</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
What is weird is I did an "apt-get install nginx" in the</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
container and it worked? <br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br>So that's one issue.</div>
<div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
The other nagging issue is mounting a USB thumb drive.</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
It works fine on the host but in the container, it complains about</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
read write, or something similar.  (Sorry,  at work right now).</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
I thought maybe there's a "How To" for setting this
 up?</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
It seems that there isn't much good documentation around for <br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
LXC and containers?</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
Thanks for your help.</div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"><br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal">
Ray<br></div><div style="color:rgb(0,0,0);font-size:13.3333px;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;background-color:transparent;font-style:normal"></div></div></div><br>_______________________________________________<br>

lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>