[Lxc-users] Running LXC containers on a laptop

Sebastien Pahl seb at dotcloud.com
Fri Sep 24 15:17:16 UTC 2010


Hi,

you need to setup snat or masquerading if you want your containers to
access the network.

# sysctl -w net.ipv4.ip_forward=1

snat (you need your ):
# iptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to-source=WLAN0_IP

OR

masquerading:
# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

On Fri, Sep 24, 2010 at 17:01, matto fransen <mattofransen at gmail.com> wrote:
> Hi,
>
> When I use br0 on my laptop (with wifi connection) I can connect from
> the container to the laptop, but not outside the laptop.
>
> What is the most easy way to setup wlan0 as gateway for
> the containers?
>
> Thanx!
>
> Matto
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>



-- 
Sebastien Pahl
@sebp




More information about the lxc-users mailing list