Here, i've built a script that gets the time a user accessed the login page and stores it in a session with the user's i.p address and when next the same user accesses the login page, if the time difference is less than 5 seconds, the script wil display a message telin the user to wait for 5 seconds more before logging in again. Does this algorithm help prevent or reduce dos attacks? Thanks in advance
Olagsfark 0 Newbie Poster
Recommended Answers
Jump to PostYou could easily create a PHP method to record each hit from each IP.
Just input the hits to your database and increment a given column on the table.
If so many hits deny IP by writing to Apache or another php script which will deny IP.
If you think …
Jump to PostOlagsfark, what you're describing does not prevent DOS attacks (there's nothing you can do in your scripts about that) but it is an example of flood control. It prevents flooding, which is when someone tries to repeatedly fill out forms on your website in order to create many multiple entries …
All 7 Replies
Szabi Zsoldos 26 Learner and helper guy
Olagsfark 0 Newbie Poster
JorgeM 958 Problem Solver Team Colleague Featured Poster
Banderson 29 Junior Poster in Training
Dani 4,653 The Queen of DaniWeb Administrator Featured Poster Premium Member
Olagsfark 0 Newbie Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.