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

Archived

This topic is now archived and is closed to further replies.

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