Date: Fri, 21 Jun 2002 16:31:17 +0300 From: Giorgos Keramidas <keramida@FreeBSD.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: hackers@FreeBSD.org Subject: Re: Limiting clients per source IP address (ftpd, inetd, etc.) Message-ID: <20020621133117.GB2476@hades.hell.gr> In-Reply-To: <3D129CA8.EFADA4FF@mindspring.com> References: <20020621000924.GA2178@hades.hell.gr> <3D129CA8.EFADA4FF@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-06-20 20:25 +0000, Terry Lambert wrote: > 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. > > Someone just did something similar for inetd (per IP per port). I know. I missed that post (probably deleted it accidentally), and a friend told me that this was being discussed. Since I had been giving the topic a big of thought, I thought I'd post what I had and ask for comments. The friend who notified me about this mentioned that a linear list was being used and what I had so far would probably be OK for inetd too. > 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. A simple core reuse of ../../foo.c would probably be sufficient in this case, since the part that does the limiting only needs the following interface: find_client_addr(); find_client_pid(); add_client(addr, pid); del_client(pid); /* called by reapchild() */ > 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. Sound very general to me, and I can't say I don't like the idea. - Giorgos 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?20020621133117.GB2476>