Jump to content


deny a range of Ip addresses

  • Please log in to reply
1 reply to this topic

#1 mandrakethepenguin

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 06 August 2006 - 02:37 PM

How do I block more than one range of IP addresses.  And can I do this without a .htaccess file, or can I do it through one of the config files.  I'm running SuSE Linux 10 on the server.

#2 youcantoo

  • Members
  • PipPip
  • Member
  • 19 posts

Posted 11 August 2006 - 10:58 PM

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:  <-- blocks a single ip number
ALL: <- 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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users