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
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
On 09/24/2010 05:17 PM, Sebastien Pahl wrote:
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:
On Fri, Sep 24, 2010 at 17:21, Daniel Lezcano daniel.lezc...@free.fr wrote:
On 09/24/2010 05:17 PM, Sebastien Pahl wrote:
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
I'm lazy too, that's why I let libvirt set up and maintain networking for me.
apt-get install libvirt
Now, set up your guests with:
lxc.network.type=veth
lxc.network.link=virbr0
lxc.network.flags=up
and NATing should just work. FWIW.
- Scott
I never tried libvirt (I guess all this XML scares me a bit:-P). Are
there any good examples of how to use it with lxc?
On Fri, Sep 24, 2010 at 17:38, Scott Bronson bron...@rinspin.com wrote:
I'm lazy too, that's why I let libvirt set up and maintain networking for me.
apt-get install libvirt
Hi,
On Fri, Sep 24, 2010 at 05:20:04PM +0200, Daniel Lezcano wrote:
On my host I have also in /etc/network/interfaces:
auto br0
iface br0 inet static
address 172.20.0.1
netmask 255.255.255.0
bridge_stp off
bridge_maxwait 5
pre-up /usr/sbin/brctl addbr br0
On Fri, Sep 24, 2010 at 8:44 AM, Sebastien Pahl s...@dotcloud.com wrote:
I never tried libvirt (I guess all this XML scares me a bit:-P). Are
there any good examples of how to use it with lxc?
Agreed, but if you just use libvirt's network setup and not the rest
of it, no need to touch XML. It