[Lxc-users] Setting up server in lxc container for dummies
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Aug 13 16:46:11 UTC 2013
Quoting Dan Kegel (dank at kegel.com):
> On Tue, Aug 13, 2013 at 7:11 AM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > For a container, with ip 10.0.3.100, running a mail server on port 25,
> > the only rule I add is:
> >
> > iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 25 -j DNAT --to-destination 10.0.3.100:25
>
> That works, thanks. But it only works as observed from other boxes
> on the LAN. What would I have to do to also be able to connect to
> the lxc guest service from the lxc host?
Heh, I've never noticed that. I always go to 'container.lxc' if i'm on
the host. I suspect you could add a rule for -i lo?
More information about the lxc-users
mailing list