Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 20:25:28 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Giorgos Keramidas <keramida@FreeBSD.org>
Cc:        hackers@FreeBSD.org
Subject:   Re: Limiting clients per source IP address (ftpd, inetd, etc.)
Message-ID:  <3D129CA8.EFADA4FF@mindspring.com>
References:  <20020621000924.GA2178@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas wrote:
> I've been thinking for quite some time to add per-client-IP limiting
> to ftpd, and I had almost decided upon something like the following,
> where each child of ftpd has two numbers associated with it.  The
> client IP address, and the PID of the ftpd child that serves it.  The
> hash at the beginning of the lists serves as a minor assistance in
> splitting the 2^32 address space in smaller chunks so that we don't
> end up with a singly linked list of a few thousand entries.

Someone just did something similar for inetd (per IP per port).

The more I think about this, and the fact that there is code growing
to do basically the same thing in every program, the more I think
that the code to do this needs to be centralized.

I would prefer a divert to an administrative daemon approach,
using ipfw rules and exisitng code.

You could also do it in the kernel, or you could do it by adding
a wrapper library for "accept" and "close", where the accounting
on connections can be enforced.

Putting this code into a seperate daemon, or even natd, makes a
lot more sense to me than hacking up the kernel, or every network
application ever written.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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