New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
With that statement, I thing you dont know what you're talking about.
Listen to what people said here.
Remember you asking for help here, no one will write the completed script for you, you act like a boss here.
If multiple connection is the issue, just lock them to X at a time.
iptables -I INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above X -j DROP
"Freedom of information" sites tend to make good money on ads and subversive means of getting visitors to generate traffic for them. If you can't afford to hit up fiverr for this, you should consider a new profession.
I am not gonna spoonfeed but have a look at.
It's not a profession, it's just a hobby,
may come as a shock but some people do things for the enjoyment and to help others.
will look at iptables as a possible solution
@painfreepc If all you want is to top the crawlers / attempts at maxing your connections via script, there are a few ways, two that I think of,
Have a DB to log downloads by IP (This will end with your DB being fucked like a corner bitch on a Friday night)
Use random links for downloads (Read tokens) This can be done simply with a date stamp, or if they hate you enough you'll have to salt it.
You want a recipe, or pay me $50USD worth of JarCoin.
I am a self-taught dev, with no shits given to security, so you can take your loans and stick them in my bum.
WOW, someone offering real help, funny shit, i read all the bullshit from others above,
i never said not even once, that i would not pay.
the script i link to in my opening post works,
only problem is, i wish to allow client to to download upto 5 zips
and then disallow downloads for 24 hours..
Don't get it, i am lost,
LET has a Discussions going about how to watch Netflixs where it's not allowed per account, but that's ok - i ask for help and i am called out for piracy,
WSS is a smart ass to almost everyone, but i am called a douche..
heading directly to iptables to handle possibly legit website traffic with a harsh DROP via (not recent, not hashlimit, but) connlimit is considered impolite; nginx and apache can tweak rate, limits and UA too
then again OP's site seems to be just a directory listing, before stripting in PHP he better check those iptables docs in depth, then install firehol
You expect free work and lend no hand in contributing. Now you're throwing a pity party.
Most of the logic has already been laid our for you. Run with the idea and add it to your PHP script. If you don't want to limit by IP, then find a unique way of labeling each 'user'.
Well you can go full retard, Nginx -> LUA -> PHP and return a 500 if you reached 10 downloads.
It does not matter then what file you access, you can block everything on that vhost.
I used that for one experiment, its not that efficient but works:
https://pastebin.com/AkAQRYQi
lets try again, may be you sleep in class, I NEVER SAID I DID NOT WANT TO PAY,
AND I NEVER SAID DON"T LIMIT BY IP,
when client start app they download 100's of images to fill the app's GUI,
that client's IP (app) Downloading a few 100 small images at once is not the problem,
the problem is some A-Hole downloading 1000's of the same image and/or zip files all day long..
then this probably really is the best way to do what you aim for. redirect requests for the zip-files to a php script which handles the downloads and counts the hits per IP. it most likely won't work flawlessly and it easy to circumvent by just changing IP address, but it maybe a start at all.
I think you should more clearly point out, that you are looking for someone who adapts that given approach and only takes care of the small changes needed to achieve your desired behaviour. also it may help to give a budget you are willing to pay ;-)
probably work of far less than an hour given you can directly provide the required access or credentials. even easier if you have that initially suggested script and db already in place...
Well, you never offered to pay anything either. It's quite common when someone asks for a job to be done to offer $X.
You didn't offer anything.
If you want to prove me wrong, make an offer to those people who tried to help you.
And stop bitching about everyone being an asshole. You deserved it.
Let's to the point,
How much you willing to pay?
$7
Is he even doing that? Your log just showed a bunch of 206 responses. Those are different from 200.
Looks like you need a sysadmin.
Hint: He's not downloading the same file thousands of times.... he's probably using a download manager for multiple parallel requests... you can limit that with nginx rate limiting:
https://www.nginx.com/blog/rate-limiting-nginx/ (or apache equivalent. but screw apache)
Why wouldn't you just use fail2ban if majority of people are not abusing the system. For the onesie twosie people that are abusing, let fail2ban do it's thing.
.
that's probably a point where a simple redirect to a php script will bring you into trouble or at least ban the IP very fast and even a single download may fail...
@painfreepc
$30 PP and I'll have it done before the day ends.
The download manager gig can be solved with a one minute grace period per download.
that's what I am doing with the script I am linking to in my opening post..
I'm aware. $30 to modify it to your needs.
I'm funny and sometimes actually useful. That's the difference between us.
No Funny..
It could be expensive to do such "hobbies".
Like we fansubbers have to spend hundreds of dollars to keep the hobby running. We non-profit website admins have to spend hundreds of dollars to keep the server running.
You are expected to pay a lot -- your time, effort, money, pride, everything, or maybe it's better to hand those over to someone who wills to handle them and can handle them easier.
Which means, I'd expect you to be competent to manage the website.
Just my 0.02.
it's my server, it's my money, it's my passion and hobby,
I am not part of a team..
@painfreepc
And because it would have no use to others if I wrote it for free and released it on GitHub, I am asking for a fee to compensate for my time.
A quick read shows it is doing a time check,
That line is for 60min so I guess just times it by 24 (86400)
I'll have to check it more to get the 5 limit
Edit:
You'll have to change a bunch of stuff,
Add 1 to the downloads DB and download file
If downloads >= 5, check if last_download was more then 86400 seconds ago
Not to mention that it uses readfile(). There are many things that could be improved, but other than the actual code to handle it, it's fully functional.
Personally, I'd use a rewrite for, say, /download/foo/blah masked with a JS post form to keep anything trivial from going through, and a direct get request being ignored/blocked by the limit directive of the server. Of course, it'd still do all of the above, but it'd block all generic forms of spidering/fusking.
he want it for free so what he said earlier "I want to paid" just a bullshit
he avoid all people asking to paid