[LP 7.1.3]how to limit an ip adress to x connections per second for a specific page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[LP 7.1.3]how to limit an ip adress to x connections per second for a specific page

Alan Linnenbank
List,

Has anybody tried something like this? We wan't a specific page to be restricted to x number off requests per ip adres per second. Probably need to use thread locks but I don't wan't it to work for all visitors as a whole like the extending examples state.


Thanks

Alan


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: [LP 7.1.3]how to limit an ip adress to x connections per second for a specific page

Karim Dahdah
Alan,

I haven't done this before, but I want to make something like that for a
webapplication.
The method I have in mind is the following:


I have a couple of IP addresses that are listed as 'trusted'. These IP
addresses can make as much connections to a page as they wish.

IP addresses that are not listed on that list can only make one
connection each 3 seconds (as an example).

I think of building 2 tables: one with the trusted IP addresses and one
with the connections (consist of IP address and timestamp).

Each time a connection is made, the webapp checks if the IP address is
listed in the trusted list. If it is, the client can view the page.
If it doesn't, then it checks if the timestamp in the second table (the
one with the connections) is more than 3 seconds old. Then the client
gets the page, otherwise a message or a blank page is displayed.

I haven't checked if this setup is a good one. But maybe we get some
thoughts from other people on this list! :)


Greetz,

Karim Dahdah
-------------------------
-ASP- and Lasso Developer
www.doran.be




Alan Linnenbank wrote:

> List,
>
> Has anybody tried something like this? We wan't a specific page to be restricted to x number off requests per ip adres per second. Probably need to use thread locks but I don't wan't it to work for all visitors as a whole like the extending examples state.
>
>
> Thanks
>
> Alan
>
>


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage