2004-09-25 21:02:55

by stephan.dreyer

[permalink] [raw]
Subject: Get ip before accept

Hi
I'm trying to get a client ip before calling accept
Any ideas how?
It should be possible to get ip from connection queue when switching to
kernel space should it?
If ip doesnt't match a given list i want to close the not fully established
connection

Cheers,
Stephan


2004-09-25 22:49:10

by Buddy Lucas

[permalink] [raw]
Subject: Re: Get ip before accept

On Sat, 25 Sep 2004 23:02:48 +0200, Stephan Dreyer
<[email protected]> wrote:
> Hi
> I'm trying to get a client ip before calling accept
> Any ideas how?
> It should be possible to get ip from connection queue when switching to
> kernel space should it?
> If ip doesnt't match a given list i want to close the not fully established
> connection

Try netfilter/iptables:
http://www.netfilter.org/documentation/HOWTO//netfilter-hacking-HOWTO.html


Cheers,
Buddy