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

Luis Michael Ibarra michael.ibarra at gmail.com
Tue Dec 8 12:39:19 UTC 2015


Hi all,

2015-12-04 5:47 GMT-05:00 Eldon Kuzhyelil <eldon.mec at gmail.com>:

> Hi,
> I am using kubuntu 14.04 with lxc installed on it.I have created one lxc
> container and installed nginx webserver in that container and created a
> simple webpage displaying a welcome sentence.I am able to get this page
> when i enter the http://10.0.1.3 (ip address of the container).Now i want
> to display this webpage from another machine connected to the same wireless
> LAN.i have searched the bridgng techniques.But not able to do it.
> Can anybody help me in this?
>
> There you go, just update/delete your iptables rules if container's ip
changes or you stop using the service.

#echo 1 > /proc/sys/net/ipv4/ip_forward
#iptables -A FORWARD -j ACCEPT
#iptables -t nat -A PREROUTING -d ${HOST} -p tcp --dport 80 -j DNAT --to
${CONTAINER}:80 -m comment --comment "http to ${CONTAINER}"



> Thank you
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>



-- 
Luis Michael Ibarra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20151208/7ede21c0/attachment.html>


More information about the lxc-users mailing list