Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [Security] How to block a particular ip?
#11
Not Solved
Sadly,the above option is a paid one.

However,now i have to block some china data center with the ip 220.243.135.xxx and then 220.243.136.xxx


I added to the .htaccess


SetEnvIfNoCase User-Agent "chinanetcenter" bad_bot


and also

Deny from 220.243.135.0/255


But they are still visiting my website with the 220.243.135.xxx

Any idea?

Thankyou.
Reply
#12
Not Solved
There's no way anyone can visit your site if their IP is blocked. So either they are using an IP that is not blocked, or there's something wrong with your method of blocking. Blocking from ACP, or directly with htaccess works fine.
What goes around comes around
Reply
#13
Not Solved
(10-22-2018, 09:41 AM)kbilly Wrote: Sadly,the above option is a paid one.

However,now i have to block some china data center with the ip 220.243.135.xxx and then 220.243.136.xxx


I added to the .htaccess


SetEnvIfNoCase User-Agent "chinanetcenter" bad_bot


and also

Deny from 220.243.135.0/255


But they are still visiting my website with the 220.243.135.xxx

Any idea?

Thankyou.

Look at the screenshot.

Input 220.243.135.*

That should take care of your issue.

[Image: f081c5826e135ba7394595c492cd1bb3.png]
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: y3xr3cj5]
Reply
#14
Not Solved
(08-05-2018, 04:11 PM)Serpius Wrote:
(08-05-2018, 03:46 PM)kbilly Wrote: I will bump this thread instead of making another one.

I would like to block all the users from the following:

host-156.197.93.165-static.tedata.net

How can i add it to .htaccess file?

Thankyou.

To block a range of IP addresses, you do this...

Example:

deny from 41.57.116.0/254

That will block anyone with that IP address that begins with '0' all the way up to '254'. 

Wrong! the part after the slash (254 in this case) is called a netmask. A netmask says how many bits (starting with the most significant of the first octet) must match. A netmark of 254 says that only the least significant bit of the last octet may differ. [/i]41.57.116.0/254[/i] will only match 41.57.116.0 and 41.57.116.1. If you want to block 41.57.116.*, you should use a netmask of 24. If that is too hard to calculate, you can use a dotted notation for netmasks; each octect of the netmask matches an octect from the IP4 address. A netmask of 255.255.255.0 says the first three octects must match, but the fourth octect can be anything.
Reply
#15
Not Solved
Thanks for your help, please check the screenshots.

   

   

So,what am i doing wrong?

Should i add it like laie_techie told?If yes,then simply like this?


220.243.135.0


I have blocked them since a week but they still access my forum.

Thanks
Reply
#16
Not Solved
(10-22-2018, 09:37 PM)kbilly Wrote: Thanks for your help, please check the screenshots.





So,what am i doing wrong?

Should i add it like laie_techie told?If yes,then simply like this?


220.243.135.0


I have blocked them since a week but they still access my forum.

Thanks

This is a partial list of IPs that I have blocked.

#this list includes network data on the following countries:
#GHANA
<Limit GET POST>
order allow,deny
deny from 41.57.116.0/22
deny from 41.57.192.0/18
deny from 41.66.192.0/18
deny from 41.74.80.0/20
deny from 41.75.48.0/20
deny from 41.76.24.0/21
deny from 41.77.64.0/21
deny from 41.78.40.0/22
deny from 41.78.124.0/22
deny from 41.78.144.0/22
deny from 41.79.96.0/22
deny from 41.93.128.0/17
deny from 41.139.0.0/18
deny from 41.189.160.0/19
deny from 41.190.68.0/22
deny from 41.190.88.0/22
deny from 41.191.96.0/22

Then at the end of the .htaccess, I have this...

# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
<Files "error.log">
	Order Deny,Allow
	Deny from all
</Files>

This method works for my website. 

No more visitors from countries that I do not want to come to my website because of their blackhat activity.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: y3xr3cj5]
Reply
#17
Not Solved
To block a range of IP addresses, you do this...

Example:

deny from 41.57.116.0/254

That will block anyone with that IP address that begins with '0' all the way up to '254'.

However, that IP address: 156.197.93.165 is a static address...

So to deny anyone from that address you do this...

deny from 156.197.93.165

Agen Sbobet Terpercaya
Reply
#18
Not Solved
(10-23-2018, 09:45 AM)Serpius Wrote: No more visitors from countries that I do not want to come to my website because of their blackhat activity.
Terrible loss to Ghana  Sad
What goes around comes around
Reply
#19
Not Solved
(10-24-2018, 12:36 PM)Ashley1 Wrote:
(10-23-2018, 09:45 AM)Serpius Wrote: No more visitors from countries that I do not want to come to my website because of their blackhat activity.
Terrible loss to Ghana  Sad

Not my fault if my website gets spammed a lot by IPs from Ghana. 

It got so bad that I was forced to do this. I didn't want to, but I had to.

Until the government of Ghana stops those illegal IPs from spamming websites like mine, I will continue to blacklist countries such as Ghana. 
There are other countries listed that are not shown in the screenshot. 

My website is NOT the only one that blocks countries like this.

(10-24-2018, 12:02 PM)4plays Wrote: To block a range of IP addresses, you do this...

Example:

deny from 41.57.116.0/254

That will block anyone with that IP address that begins with '0' all the way up to '254'.

However, that IP address: 156.197.93.165 is a static address...

So to deny anyone from that address you do this...

deny from 156.197.93.165

I said the exact same thing already in this POST.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: y3xr3cj5]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)