Jump to content

deny a range of Ip addresses


Recommended Posts

There are a number of ways to block ip numbers or ranges of ip numbers. The first one of the top of my hease is the hosts.deny file. usally found in the '/etc' directory of your system.
inside that file you would have something like

ALL: 61.178.127.182  <-- blocks a single ip number
ALL: 61.145.126.0/255.255.240.0 <- blocks 255 ip numbers (.0-.255)
ALL: 61.151.  <-- matches the fist two octels (blocks lots of ip starting with 61.151)
ALL: .co.jp <-- blocks everything with with a domain ending with (.co.jp)

another way is to block them within the httpd.conf file using the

Order Deny,Allow
Deny from xxx.xxx.xxx.xxx <--repeat as needed
Deny from xxx.xxx.xxx.xxx      each on a line by its self
Allow from all

last would be using .htaccess

personally, I use all three

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.