Gentoo Archives: gentoo-user

From: thelma@×××××××××××.com
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] apache htaccess - block IP range
Date: Tue, 17 Mar 2020 22:16:50
Message-Id: 64ac685a-03e2-8735-f0e2-7c4173877e2a@sys-concept.com
In Reply to: Re: [gentoo-user] apache htaccess - block IP range by Michael
1 I'm still using apache 2.2
2
3 So I think it should be:
4 deny from 114.119.128.0/24
5
6 With the:
7 <RequireAll>
8 Require all granted
9 Require not ip 114.119.128.0/24
10 </RequireAll>
11
12 I couldn't even access my own webpage from localhost.
13
14
15 Thelma
16 On 03/17/2020 04:00 PM, Michael wrote:
17 > On Tuesday, 17 March 2020 21:56:29 GMT thelma@×××××××××××.com wrote:
18 >> Will it work:
19 >> deny from 114.119.128.0/114.119.191.255
20 >>
21 >> Thelma
22 >
23 > It is better to use this syntax:
24 >
25 > <RequireAll>
26 > Require all granted
27 > Require not ip XX.XXX.XX.XXX
28 > </RequireAll>
29 >
30 >
31 > So your example address space becomes:
32 >
33 > Require not ip 114.119.128
34 >
35 > Or;
36 >
37 > Require not ip 114.119.128.0/24
38 >
39 > Or;
40 >
41 > Require not ip 114.119.128.0/255.255.255.0
42 >
43 >
44 > Look in Google for webpages providing geo-ip blocking advice, but China is
45 > vast and so is their ability to buy/change more IP addresses per day. So this
46 > is a moving beast.
47 >
48 > HTH.
49 >