jails, ipfilter & stunnel

Uwe Doering gemini at geminix.org
Tue Jul 15 00:13:35 PDT 2003


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 at geminix.org  |  http://www.escapebox.net



More information about the freebsd-security mailing list