On 07/11/2013 04:45 PM, Robin Monjo wrote:
> Hello,
>
> I need to know the IP address of a running container in order to add a port 
> forwarding rule with iptables.  My containers are build using the default 
> ubuntu template and use dhcp to obtain an IP.
>
> I'm able to access the ip by reading the /var/lib/misc/dnsmasq.leases file. 
> However I'm not sure this is reliable.
>
> What do you think ? Any better way to do it ?
>

What version of LXC do you use?
In 0.9 it works from API, at least 'lxc-ls --fancy' prints the guest IP.

tamas

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to