[Lxc-users] trying to bridge wireless

Serge Hallyn serge.hallyn at canonical.com
Fri Jun 3 15:14:13 UTC 2011


Quoting matthew byers (faintstlsaint at gmail.com):
> Hey i am trying to run lxc on my laptop but am having problem setting up
> bridge. My internet connection consist of a WAN that i have absolutely no
> control over. I connect my tablet to the network and then tether it to my
> laptop. I followed directions from this site:
> http://s3hh.wordpress.com/2011/05/17/lxc-containers-on-a-host-with-wireless/ up
> until the point of running: ifup br0 #in which i get the Ignoring Uknown
> Interface.....as shown below
> 
> stlsaint at stlsaint-devcore:~$ cat /etc/network/interfaces
> auto lo
> iface lo inet loopback
> 
> auto lxcbr0
> iface lxcbr0 inet static
> address 192.168.42.8
> netmask 255.255.255.0
> post-up /opt/bin/lxcbr0-up
> 
> 
> stlsaint at stlsaint-devcore:~$ cat /opt/bin/lxcbr0-up
> #!/bin/sh
> # This is the address we assigned to our bridge in /etc/network/interfaces
> braddr=192.168.42.8
> # ip address range for containers
> brrange=192.168.42.9,192.168.42.230
> iptables -A FORWARD -i lxcbr0 -s /24 -m conntrack --ctstate NEW -j ACCEPT
> iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
> iptables -A POSTROUTING -t nat -j MASQUERADE
> dnsmasq --bind-interfaces --conf-file= --listen-address  --except-interface
> lo --dhcp-range  --dhcp-lease-max=253 --dhcp-no-override
> 
> 
> stlsaint at stlsaint-devcore:~$ sudo ifup br0
> Ignoring unknown interface br0=br0.

D'oh!

Halfway through writing the post I changed br0 to lxcbr0.  Apparently not completely.
What happens if you do:

sudo ifup lxcbr0

?




More information about the lxc-users mailing list