[Lxc-users] Can not ping outside of local LAN from within a LXC

Kevin LaTona lists at studiosola.com
Sat Jul 27 14:04:07 UTC 2013


Hi Saurabh,

I have tried that and it has not seemed to matter yet in this setup.

I have been told that the container's /etc/network/interfaces calls should set it, but for whatever reason in this case it is not.

For now at least I am using a "route add default gw 192.168.0.1" in the container's startup script and that is solving the issue.

As even placing the route call in the container's /etc/network/interface stanza has not had an effect yet.


I am curios if people on other OS platforms are having the same issues, as from what I have seen on the web this is not a new problem.

Or if this issue has more to with how Ubuntu 12.04.2 and LXC are currently interacting with each other.

I still don't know and there are still many variables to tie down to know why for sure.

Thanks for your suggestion.

-Kevin



On Jul 27, 2013, at 1:26 AM, Saurabh Deochake <saurabh.d04 at gmail.com> wrote:

> Hi Kevin,
> 
> Did you try adding lxc.network.ipv4.gateway=<IP_address> in the configuration file of the container?
> 
> The address is in format  x.y.z.t/m,  eg.  192.168.0.1/24.
> 
> Regards,
> Saurabh Deochake.
> [NTT DATA]
> 
> 
> On Sat, Jul 27, 2013 at 3:45 AM, Kevin LaTona <lists at studiosola.com> wrote:
> 
> On Jul 26, 2013, at 3:11 PM, Luis M. Ibarra <michael.ibarra at gmail.com> wrote:
> 
> > can you post your container config?
> 
> 
> lxc.utsname = vm1
> 
> lxc.network.type=veth
> lxc.network.link=br0
>  lxc.network.name = br0
> 
> lxc.network.hwaddr = 00:16:3e:2a:53:c1
> lxc.network.ipv4 = 192.168.0.30/24
> lxc.network.flags=up
> 
> lxc.devttydir = lxc
> lxc.tty = 4
> lxc.pts = 1024
> lxc.rootfs = /var/lib/lxc/vm1/rootfs
> lxc.mount  = /var/lib/lxc/vm1/fstab
> lxc.arch = amd64
> lxc.cap.drop = sys_module mac_admin
> lxc.pivotdir = lxc_putold
> 
> # uncomment the next line to run the container unconfined:
> #lxc.aa_profile = unconfined
> 
> lxc.cgroup.devices.deny = a
> 
> # Allow any mknod (but not using the node)
> lxc.cgroup.devices.allow = c *:* m
> lxc.cgroup.devices.allow = b *:* m
> 
> # /dev/null and zero
> lxc.cgroup.devices.allow = c 1:3 rwm
> lxc.cgroup.devices.allow = c 1:5 rwm
> 
> # consoles
> lxc.cgroup.devices.allow = c 5:1 rwm
> lxc.cgroup.devices.allow = c 5:0 rwm
> 
> #lxc.cgroup.devices.allow = c 4:0 rwm
> #lxc.cgroup.devices.allow = c 4:1 rwm
> 
> # /dev/{,u}random
> lxc.cgroup.devices.allow = c 1:9 rwm
> lxc.cgroup.devices.allow = c 1:8 rwm
> lxc.cgroup.devices.allow = c 136:* rwm
> lxc.cgroup.devices.allow = c 5:2 rwm
> 
> # rtc
> lxc.cgroup.devices.allow = c 254:0 rwm
> 
> #fuse
> lxc.cgroup.devices.allow = c 10:229 rwm
> 
> #tun
> lxc.cgroup.devices.allow = c 10:200 rwm
> 
> #full
> lxc.cgroup.devices.allow = c 1:7 rwm
> 
> #hpet
> lxc.cgroup.devices.allow = c 10:228 rwm
> 
> #kvm
> lxc.cgroup.devices.allow = c 10:232 rwm
> 
> 
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130727/9061b8e2/attachment.html>


More information about the lxc-users mailing list