[lxc-users] Unable to connect to internet from LXC container

Gandhi, Ibha (HP Software) ibhag at hp.com
Tue Jan 21 18:26:16 UTC 2014


Hi,

I am new to LXC and networking in Ubuntu and need help urgently.
I am able to ping the container from the host and vice versa.
The host can connect to internet but the container cannot.
I pinged gateway from container but that also doesn't work.

However, output of route -n from the container is:
ubuntu at root-local-machine-2:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0               10.x.x.x            0.0.0.0              UG    100    0        0 eth0
10.x.x.x            0.0.0.0               255.255.x.x     U          0      0        0 eth0

>From the host:
eth0      Link encap:Ethernet  HWaddr 00:50:56:9c:24:d5
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:268433 errors:0 dropped:1103 overruns:0 frame:0
          TX packets:37678 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:29370538 (29.3 MB)  TX bytes:2921285 (2.9 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1957142 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1957142 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:523335220 (523.3 MB)  TX bytes:523335220 (523.3 MB)

lxcbr0    Link encap:Ethernet  HWaddr 00:50:56:9c:24:d5
          inet addr:10.x.x.x  Bcast:10.x.x.x  Mask:255.x.x.x
          inet6 addr: fe80::250:56ff:fe9c:24d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1458768 errors:0 dropped:179 overruns:0 frame:0
          TX packets:767080 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:226231989 (226.2 MB)  TX bytes:127523082 (127.5 MB)

vethSkshFq Link encap:Ethernet  HWaddr fe:d5:d2:af:33:89
          inet6 addr: fe80::fcd5:d2ff:feaf:3389/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:616967 errors:0 dropped:0 overruns:0 frame:0
          TX packets:597510 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:112249698 (112.2 MB)  TX bytes:82433706 (82.4 MB)

Any help will be appreciated.

Thanks,
Ibha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140121/d5c4201d/attachment.html>


More information about the lxc-users mailing list