Reputation: 183
My forum is bombarded by fake guests. I have tried everything (too many to list) but they still keep coming.
In my stats I see that most "fake users" are coming from China and use Linux. Is there an (easy) way to block requests from "users" coming from China and using Linux?
Thank you
Upvotes: 0
Views: 99
Reputation: 58617
As a matter of fact, yes. What you can do is periodically download this file of APNIC net blocks: ftp://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-extended-latest
Then using a script, you can convert the information into iptables
rules.
My own script blocks all traffic bound for certain ports from all IP blocks in that file, except ones for these countries: JP, KR, TW, HK, AU, GB, CA, US, NZ.
Good luck!
Upvotes: 1