LXC Container Notes
When you use “lxc-destroy” to get rid of a container, it doesn’t clean-up the DHCP lease from DNSMASQ. To do that you need to remove the reservation from the cache which is in /var/lib/misc/dnsmasq.lxcbr0.leases – once you do that, you need to bounce the DNSMASQ service with ” /etc/init.d/dnsmasq restart ”
to change container start parameters, edit the file /var/lib/lxc/container_name/config
lxc.start.auto = 1 (to auto-start)
lxc.start.delay = 0 (in seconds)
lxc.start.order = 0 (higher means earlier)
Example of port forwarding into a container (You don’t want to do this on port 80 if your using reverse proxy. Host can already pass traffic to lxc containers)
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 -j DNAT –to 10.0.3.143:80