[lxc-users] make a nginx webserver in a lxc container available to the local wireless lan

Fajar A. Nugraha list at fajar.net
Wed Dec 9 12:38:20 UTC 2015


On Wed, Dec 9, 2015 at 6:41 PM, Eldon Kuzhyelil <eldon.mec at gmail.com> wrote:

> and my interface file looks like this now
>
>
> auto lo
> iface lo inet loopback
>
> auto br0
> iface br0 inet static
>         address 192.168.0.10(my ip address when connected through ethernet)
>         network 192.168.0.0
>         netmask 255.255.255.0
>         broadcast 192.168.0.255
>         gateway 192.168.0.1
>         bridge_ports eth0
>         bridge_fd 9
>         bridge_hello 2
>         bridge_maxage 12
>         bridge_stp off
>
> Now bring up the bridge:
>
> sudo ifup br0
>
>
>
> But after rebooting i am still not able to connect to internet using ethernet or wifi.
>
>
First thing's first: do NOT even bother with bridging if you still use wifi
to access the internet. If you HAVE to use wifi, use NAT instead (there's
an example in the first link)



> What to do?
>
>
Do some basic trobleshooting:
- is the HOST able to connect to the internet?
- what does these commands show on the host:

brctl show
ip ad li
ip route
ethtool eth0
ping -n -c 1 192.168.0.1
ping -n -c 1 8.8.8.8
ping -n -c 1 google.com
cat /etc/resolv.conf

My GUESS is you're missing something simple, like:
- the cable is unplugged
- you're trying to setup bridging with eth0 while you're connected using
wifi
- your interface name is not eth0, but something else
- you previously use DHCP, and now since you use static address your
resolv.conf is empty since you haven't set it up

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151209/41787968/attachment.html>


More information about the lxc-users mailing list