Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2003 09:12:53 +0200
From:      Uwe Doering <gemini@geminix.org>
To:        Pawel Jakub Dawidek <nick@garage.freebsd.pl>
Cc:        "V. Jones" <vjones62@earthlink.net>
Subject:   Re: jails, ipfilter & stunnel
Message-ID:  <3F13A975.7020508@geminix.org>
In-Reply-To: <20030714211518.GD4973@garage.freebsd.pl>
References:  <8213881.1058211676830.JavaMail.nobody@beaker.psp.pas.earthlink.net> <20030714211518.GD4973@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek wrote:
> On Mon, Jul 14, 2003 at 12:39:50PM -0400, V. Jones wrote:
> +> >You can check my patch for multiple ips in jails which also fix
> +> >sockets ordering behaviour.
> +> 
> +> >   	For FreeBSD 4.x:
> +> >   	http://garage.freebsd.pl/mijail.tbz
> +> >   	http://garage.freebsd.pl/mijail.README
> +> >   	For FreeBSD 5.1-CURRENT:
> +> >   	http://garage.freebsd.pl/mijail5.tbz
> +> >   	http://garage.freebsd.pl/mijail5.README
> +> >   	http://garage.freebsd.pl/patches/mijail5.patch
> +> 
> +> I have a feeling you're trying to tell me something important
> +> but I'm not understanding.  Is this a problem only with ssh or 
> +> with any server listening on a port?  Does this problem occur 
> +> when you share an ip address between two jailed servers or does 
> +> it happen any time you use a jail?  Would having ssh on a 
> +> different port on each jail avoid the problem?
> 
> No, because an attacker is able to spoof your daemons from main host or
> other jails. Even if you're binded to a valid IP (not INADDR_ANY) there
> could be always a chance to DoS existing daemon and reuse its port.
> 
> My advice is simple: every jail and main host should have its own IP address.

This is certainly the best solution, if you have multiple IP addresses 
at your disposal.  What I was trying to point out is that there is no 
_technical_ reason for separate IP addresses with regard to FreeBSD's 
jail implementation.  In cases where you cannot easily get additional IP 
addresses, on a rented server in a data center, for instance, running 
multiple jails on the same IP address (with the necessary safety 
precautions like binding daemons to IP addresses explicitly) is still 
far better than no jails at all.  The difference is that it takes at 
least some skill and insight into FreeBSD internals to compromise the 
system as a whole in the former case, while in the latter each and every 
script kiddy can take over your entire server in no time.

    Uwe
-- 
Uwe Doering         |  EscapeBox - Managed On-Demand UNIX Servers
gemini@geminix.org  |  http://www.escapebox.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F13A975.7020508>