IXN
IXN

Reputation: 183

block bots from China using linux

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

Answers (1)

Kaz
Kaz

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

Related Questions