Jump to content
mrmike987

Blocking Ip Ranges

Recommended Posts

You can add a deny from 62.56.129 in your htaccess file to block the entire range from 62.56.129.0 to 62.56.129.255.

 

 

But I only want to block the range above. Do have to put in every address or is there a shortcut

Share this post


Link to post
Share on other sites

As GvilleRick actually said just add 62.56.129. to your htaccess file as

 

deny from 62.56.129.

 

there is something to put before it but I forget.

Share this post


Link to post
Share on other sites

I did a google search and found this:

 

RewriteEngine On

RewriteCond %{REMOTE_ADDR} ^aaa\.bbb\.(23[2-9]¦24[0-2])\. [OR]

RewriteCond %{REMOTE_ADDR} ^aaa\.bbb\.243\.([0-9]¦[1-9][0-9]¦1[0-4][0-9]¦15[0-1])$

RewriteRule .* - [F]

 

where aaa and bbb are the first respectively second '***' from your range. Be sure to replace the broken pipe characters ¦ with the real ones from your keyboard.

 

Adapt it to your range.

Share this post


Link to post
Share on other sites

Seriously over complicated there

 

>order allow,deny
deny from 62.56.129.
allow from all

 

hxxp://www.javascriptkit.com/howto/htaccess5.shtml is a great source of htaccess info.

Edited by carbonize

Share this post


Link to post
Share on other sites

But he doesn't want to block the entire block of address, just a range of addresses.

Share this post


Link to post
Share on other sites

Ah yes you're right. Nasty habit I have of speed reading forums.

 

Using my method he could use

 

deny from .satcom-systems.net

 

but for some reason the server doesn't always get the hostname of visiting ip addresses.

Share this post


Link to post
Share on other sites

Within IP Deny Manager:

 

You can specify denied IP addresses in the following formats:

10.5.3.3 Single IP Address

10.5.3.3-10.5.3.40 Range

10.5.3.5-40 Implied Range

10.5.3.3/32 CIDR Format

10. Implies 10.*.*.*

 

So in your case, you could use any one of the following formats:

62.56.129.128/27

62.56.129.128-159

62.56.129.128-62.56.129.159

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...