[lxc-users] No outgoing traffic with bridged network and public IP address from container

Tamas Papp tompos at martos.bme.hu
Thu Sep 11 09:22:52 UTC 2014


On 09/11/2014 11:05 AM, othiman wrote:
> Hi everyone,
>
> I already posted this to askubuntu.com 
> (http://askubuntu.com/questions/522457/lxc-container-no-outgoing-traffic-with-bridged-network-and-public-ip-address), 
> but I think this might be a better place to find help.
>
> I try to setup a LXC container with bridged network on ubuntu 14.04.1, 
> but the outgoing traffic seems to be blocked. Ping another IP than the 
> container's one is not working. Actually I tried this with a working 
> container of a ubuntu 12.04 host moved to new hardware and a recent 
> ubuntu 14.04, but the problem also applies to a new created ubuntu 
> 14.04 container.
>
> I should mention that if I bind the IP address to an aliasing 
> interface of the host directly, pinging inside and outside to the host 
> is working correctly.
>

> lxc.network.ipv4=91.143.88.119/24
>     lxc.network.ipv4.gateway=91.143.88.1


>
>     auto br0
>     iface br0 inet static
>         address 81.7.15.233
>         netmask 255.255.255.0
>         broadcast 81.7.15.255
>         gateway 81.7.15.1
>         bridge_ports eth0
>         bridge_fd 0
>         bridge_stp off
>         bridge_waitport 0
>         bridge_maxwait 0
>
>
> and on the client:
>     auto lo
>     iface lo inet loopback
>
>     auto eth0
>     iface eth0 inet static
>         address 91.143.88.119
>         netmask 255.255.255.0

First of all either use guest's network file or lxc.networ.ipv4* 
settings. There is no reason to use both.

Can you ping 91.143.88.1?
What do you see with tcpdump -i eth0 on the host machine?

tamas


More information about the lxc-users mailing list