Gentoo Archives: gentoo-user

From: Alarig Le Lay <alarig@××××××××××.fr>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] apache htaccess - block IP range
Date: Wed, 18 Mar 2020 12:59:58
Message-Id: 20200318125908.d5uan6xwnklh5cfw@mew.swordarmor.fr
In Reply to: [gentoo-user] apache htaccess - block IP range by thelma@sys-concept.com
1 Hi,
2
3 On mar. 17 mars 15:47:36 2020, thelma@×××××××××××.com wrote:
4 > How to block in .htaccess file certain IP range?
5 >
6 > I have bot from huawei.com on my server for several days:
7 > IP: 114.119.128.0 - 114.119.191.255
8 > Or just block all China
9
10 In a case like this, I’m not trying to bother about how to do this with
11 apache/nginx or another process, I’m blocking the traffic directly from
12 iptables:
13 iptables -s 114.119.128.0/19 -j DROP
14
15 --
16 Alarig